aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Saxon <elijah@riseup.net>2005-03-10 11:23:59 +0000
committerElijah Saxon <elijah@riseup.net>2005-03-10 11:23:59 +0000
commitceb80d70b187964af9c9ad914fbd56a175424a62 (patch)
tree5036c53bdc0ca48f8fcac503031be07725ec5aea
parent6b965976bd596565ce808d0cd2856fd2a4f2dd61 (diff)
downloadbackupninja-ceb80d70b187964af9c9ad914fbd56a175424a62.tar.gz
backupninja-ceb80d70b187964af9c9ad914fbd56a175424a62.tar.bz2
added force to hard link cp
ignore rsync error code 24 ignore cp return code.
-rw-r--r--handlers/maildir14
1 files changed, 8 insertions, 6 deletions
diff --git a/handlers/maildir b/handlers/maildir
index 6da5c0f..0af8ff7 100644
--- a/handlers/maildir
+++ b/handlers/maildir
@@ -85,7 +85,9 @@ function do_user() {
--exclude '.Trash/*' --exclude '.Mistakes/*' --exclude '.Spam/*' \
$dir $destuser@$desthost:$destdir/$letter \
2>&1`
- if [ $? != 0 ]; then
+ ret=$?
+ # ignore 0 (success) and 24 (file vanished before it could be copied)
+ if [ $ret != 0 -a $ret != 24 ]; then
warning "rsync $user failed"
warning " returned: $ret"
let "failedcount = failedcount + 1"
@@ -241,11 +243,11 @@ function setup_remote_dirs() {
fi
if [ -d $destdir/$backuptype.2 ]; then
echo "Info: updating hard links to $dir.1. This may take a while."
- cp -al $destdir/$backuptype.2/. $dir.1
- if [ \$? == 1 ]; then
- echo "Fatal: could not create hard links to $dir.1 on host $desthost"
- exit 1
- fi
+ cp -alf $destdir/$backuptype.2/. $dir.1
+ #if [ \$? == 1 ]; then
+ # echo "Fatal: could not create hard links to $dir.1 on host $desthost"
+ # exit 1
+ #fi
fi
fi
[ -f $dir.1/created ] && rm $dir.1/created