From f72893956f6a816efbea098d9a3149ad26181b9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 9 Feb 2017 22:55:20 +0100 Subject: System-backup don't fail when file is removed --- local/bin/system-backup | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3