From df2d6caf1263e52b8be20f31dbc689addde7cd42 Mon Sep 17 00:00:00 2001 From: sayan Date: Wed, 24 Dec 2003 11:01:30 +0100 Subject: [PATCH] Finalement, on ignore les erreurs inintressantes -- Sayan darcs-hash:20031224100130-d1356-5593ed8813eb120f65c8ac2fcbb6cdfa194d11b5.gz --- backup.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/backup.sh b/backup.sh index 68fc6fb9..a32e858a 100755 --- a/backup.sh +++ b/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