aboutsummaryrefslogtreecommitdiff
path: root/local/bin
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-02-09 22:55:20 +0100
committerKarel Kočí <cynerd@email.cz>2017-02-09 22:55:20 +0100
commitf72893956f6a816efbea098d9a3149ad26181b9b (patch)
tree27ffdca1b46d0cc4f427dbcc74cf6ae7f51df780 /local/bin
parentecd517d2f3a6b17757a502f4d83372aa499d2f1d (diff)
downloadmyconfigs-f72893956f6a816efbea098d9a3149ad26181b9b.tar.gz
myconfigs-f72893956f6a816efbea098d9a3149ad26181b9b.tar.bz2
myconfigs-f72893956f6a816efbea098d9a3149ad26181b9b.zip
System-backup don't fail when file is removed
Diffstat (limited to 'local/bin')
-rwxr-xr-xlocal/bin/system-backup3
1 files changed, 2 insertions, 1 deletions
diff --git a/local/bin/system-backup b/local/bin/system-backup
index c3957ab..afd57d4 100755
--- a/local/bin/system-backup
+++ b/local/bin/system-backup
@@ -44,7 +44,8 @@ mount $MARGS "$PART" "$MPATH" || (echo Mount failed && exit -3)
# Do backup
while read -r DIR; do
echo -e "\e[1;33mBacking up: $DIR\e[0m"
- rsync -a --progress "$DIR" "$MPATH"/@"$MNAME"/
+ rsync -aAXS --delete --progress "$DIR" "$MPATH"/@"$MNAME"/ || [ $? -eq 24 ]
+ # We ignore exit code if rsync detects vanished source file
done <<< "$DIRS"
# Do snapshot (read only)