diff options
author | Karel Kočí <cynerd@email.cz> | 2017-02-09 22:55:20 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-02-09 22:55:20 +0100 |
commit | f72893956f6a816efbea098d9a3149ad26181b9b (patch) | |
tree | 27ffdca1b46d0cc4f427dbcc74cf6ae7f51df780 /local/bin/system-backup | |
parent | ecd517d2f3a6b17757a502f4d83372aa499d2f1d (diff) | |
download | myconfigs-f72893956f6a816efbea098d9a3149ad26181b9b.tar.gz myconfigs-f72893956f6a816efbea098d9a3149ad26181b9b.tar.bz2 myconfigs-f72893956f6a816efbea098d9a3149ad26181b9b.zip |
System-backup don't fail when file is removed
Diffstat (limited to 'local/bin/system-backup')
-rwxr-xr-x | local/bin/system-backup | 3 |
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) |