aboutsummaryrefslogtreecommitdiffstats
path: root/backuper.sh
diff options
context:
space:
mode:
Diffstat (limited to 'backuper.sh')
-rw-r--r--backuper.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/backuper.sh b/backuper.sh
index ae9e289..391c6c1 100644
--- a/backuper.sh
+++ b/backuper.sh
@@ -26,6 +26,7 @@ GENERATE=""
COMMAND=""
PLACES=""
EXCLUDE=""
+TAR_EXTRA_PARAMS=""
STORE=""
AFTER=""
FILE_TYPE=""
@@ -135,6 +136,21 @@ exclude() {
EXCLUDE="$STR"
}
+tar_extra_param() {
+ PARAM="$1"
+ if ! echo "$TAR_EXTRA_PARAMS" | grep -q -- "$PARAM" ; then
+ TAR_EXTRA_PARAMS="$TAR_EXTRA_PARAMS $PARAM"
+ fi
+}
+
+no_file_change() {
+ tar_extra_param "--warning='no-file-changed'"
+}
+
+numeric_owner() {
+ tar_extra_param "--numeric-owner"
+}
+
store() {
STORE="$@"
}
@@ -270,7 +286,7 @@ start_command() {
echo "$COMMAND" | /usr/bin/time -f "$(time_fmt "Backup took")" $REMOTE $GENERATE sh -s > "$RUNDIR"/fifo_0
else
## Exclude keep without quotes
- /usr/bin/time -f "$(time_fmt "Backup took")" $REMOTE $GENERATE tar c --preserve-permissions $EXCLUDE $PLACES > "$RUNDIR"/fifo_0
+ /usr/bin/time -f "$(time_fmt "Backup took")" $REMOTE $GENERATE tar c --preserve-permissions $TAR_EXTRA_PARAMS $EXCLUDE $PLACES > "$RUNDIR"/fifo_0
fi
}