aboutsummaryrefslogtreecommitdiffstats
path: root/backuper.sh
diff options
context:
space:
mode:
Diffstat (limited to 'backuper.sh')
-rw-r--r--backuper.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/backuper.sh b/backuper.sh
index 801c229..6b297ee 100644
--- a/backuper.sh
+++ b/backuper.sh
@@ -27,6 +27,7 @@ COMMAND=""
PLACES=""
EXCLUDE=""
TAR_EXTRA_PARAMS=""
+SSH_EXTRA_PARAMS=""
STORE=""
AFTER=""
FILE_TYPE=""
@@ -151,6 +152,18 @@ numeric_owner() {
tar_extra_param "--numeric-owner"
}
+ssh_extra_param() {
+ PARAM="$1"
+ if ! echo "$SSH_EXTRA_PARAMS" | grep -q -- "$PARAM" ; then
+ SSH_EXTRA_PARAMS="$SSH_EXTRA_PARAMS $PARAM"
+ fi
+}
+
+ssh_use_key() {
+ KEY_PATH="$1"
+ ssh_extra_param "-i "$KEY_PATH""
+}
+
store() {
STORE="$@"
}
@@ -178,7 +191,7 @@ store_ssh() {
CONNECTION="$1"
add_custom_stage "echo_and_copy "$FILENAME""
- store "ssh "$CONNECTION""
+ store "ssh $SSH_EXTRA_PARAMS "$CONNECTION""
}
echo_and_copy() {