Finalement, on ignore les erreurs inintressantes
-- Sayan darcs-hash:20031224100130-d1356-5593ed8813eb120f65c8ac2fcbb6cdfa194d11b5.gz
This commit is contained in:
parent
efcd1adef3
commit
df2d6caf12
1 changed files with 9 additions and 2 deletions
11
backup.sh
11
backup.sh
|
@ -42,11 +42,18 @@ rsync -azSHe ssh --delete $site_web backupcrans@tanek:~/httpd-$week_mod2 || exit
|
|||
rsync -azSHe ssh --delete $mails backupcrans@tanek:/mnt/backup$week_mod2/var/spool || exit 5
|
||||
rsync -azSHe ssh --delete $news backupcrans@tanek:/mnt/backup$week_mod2/var/spool || exit 6
|
||||
|
||||
# Les homes sont donnés à backupcrans.backup sans les permissions
|
||||
# Les homes sont donnés à backupcrans.backup
|
||||
# "Permission denied" errors occur because backupcrans is not root on tanek. Ignoring
|
||||
temp=$(mktemp)
|
||||
temp_mail=$(mktemp)
|
||||
rsync -azSHe ssh --delete $homes backupcrans@tanek:/mnt/backup$week_mod2 &>$temp
|
||||
grep -v -i -e "permission denied" $temp | mail sayan@crans.org -s "[Roots] Bouh, rsync se plaint et le rtc est pas content" || exit 7
|
||||
grep -vie "permission denied" $temp | grep -vie "skipping non-regular file" | grep -vie "partial transfer" > $temp_mail
|
||||
if [ -s temp_mail ]
|
||||
then
|
||||
mail roots -s "rsync error" < $temp_mail || exit 7
|
||||
fi
|
||||
|
||||
# clean
|
||||
rm -rf $temp_dir
|
||||
rm $temp
|
||||
rm $temp_mail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue