From c28c0a50889d8721b069c8cdeedc12f90b2d0d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Ob=C5=AFrka?= Date: Wed, 5 Apr 2017 09:57:28 +0200 Subject: In some cases is necessary to ignore changed files --- backuper.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'backuper.sh') diff --git a/backuper.sh b/backuper.sh index 436b791..713d94f 100644 --- a/backuper.sh +++ b/backuper.sh @@ -24,6 +24,7 @@ PLACES="" EXCLUDE="" GPG_RECIPIENTS="" TAR_EXTRA_PARAMS="" +TAR_IGNORE_FILE_CHANGE="no" SSH_EXTRA_PARAMS="" SSH_CONNECTION="" STORE="" @@ -158,6 +159,10 @@ numeric_owner() { tar_extra_param "--numeric-owner" } +ignore_file_change() { + TAR_IGNORE_FILE_CHANGE="yes" +} + ssh_extra_param() { PARAM="$1" if ! echo "$SSH_EXTRA_PARAMS" | grep -q -- "$PARAM" ; then @@ -314,6 +319,12 @@ start_command() { else ## Exclude keep without quotes /usr/bin/time -f "$(time_fmt "Backup took")" $REMOTE $GENERATE tar c --preserve-permissions $TAR_EXTRA_PARAMS $EXCLUDE $PLACES > "$RUNDIR"/fifo_0 + TAR_RET="$?" + if [ "$TAR_IGNORE_FILE_CHANGE" = "yes" -a "$TAR_RET" -eq 1 ]; then + return 0 + else + return "$TAR_RET" + fi fi } -- cgit v1.2.3