aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--backuper.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/backuper.sh b/backuper.sh
index c4797b5..12c2130 100644
--- a/backuper.sh
+++ b/backuper.sh
@@ -157,6 +157,19 @@ store_file() {
store "sh -c 'cat > ${DST}/${FILENAME}'"
}
+## This is not standart feature but it is common for several project I know
+store_ssh() {
+ [ -z "$1" ] && error "Specify server"
+ CONNECTION="$1"
+
+ add_custom_stage "echo_and_copy "$FILENAME""
+ store "ssh "$CONNECTION""
+}
+
+echo_and_copy() {
+ echo "$1" ; cat
+}
+
add_custom_stage() {
echo "$@" >> "$RUNDIR"/"$CUSTOM_STAGE_FILE"
}