From e768f3a67108e381b7ae2e120fb676539b50d4b5 Mon Sep 17 00:00:00 2001 From: Daniel Schubert Date: Mon, 11 Mar 2019 17:07:54 +0100 Subject: [PATCH] 17 improved --- beispiele/17/wp-backup/wp-backup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/beispiele/17/wp-backup/wp-backup.sh b/beispiele/17/wp-backup/wp-backup.sh index b73118a..b9d8e82 100644 --- a/beispiele/17/wp-backup/wp-backup.sh +++ b/beispiele/17/wp-backup/wp-backup.sh @@ -21,7 +21,11 @@ function file_backup { } function upload { - /usr/bin/rsync -aze 'ssh -p 64322 -i /home/dany/.ssh/server-key' /home/dany/tmp/$BACKUPFILE-$NOW.tar.xz server-name-hier:/home/dany/backups/* >> backup.log 2>&1 + /usr/bin/rsync -aze 'ssh -i /path/to/ssh-keyfile' \ + /home/dany/tmp/$BACKUPFILE-$NOW.tar.xz server-name-hier:target-dir/ >> backup.log 2>&1 + + #oder + #scp /home/dany/tmp/$BACKUPFILE-$NOW.tar.xz server-name-hier:target-dir/ >> backup.log 2>&1 } # Funktionsaufrufe