aboutsummaryrefslogtreecommitdiffstats
path: root/backuper.sh
diff options
context:
space:
mode:
authorGravatar Robin Obůrka <r.oburka@gmail.com> 2017-04-05 09:57:28 +0200
committerGravatar Robin Obůrka <r.oburka@gmail.com> 2017-04-05 09:57:28 +0200
commitc28c0a50889d8721b069c8cdeedc12f90b2d0d42 (patch)
tree6803a09f435846c79f0c1e78d664302b8190c01c /backuper.sh
parentAdd ssh_use_connection as a configuration option (diff)
downloadbackuper-c28c0a50889d8721b069c8cdeedc12f90b2d0d42.tar.xz
In some cases is necessary to ignore changed files
Diffstat (limited to 'backuper.sh')
-rw-r--r--backuper.sh11
1 files changed, 11 insertions, 0 deletions
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
}