diff options
Diffstat (limited to 'share')
-rwxr-xr-x | share/hydractl/backup-copy-site | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/share/hydractl/backup-copy-site b/share/hydractl/backup-copy-site index 25dd354..77a6cb7 100755 --- a/share/hydractl/backup-copy-site +++ b/share/hydractl/backup-copy-site @@ -52,6 +52,10 @@ if [ -z "$PORT" ]; then PORT="22" fi -# Sync to remote destination. +# Create destination folder. +echo "Login in to remote server to create remote folder..." ssh -p $PORT backups@$SERVER mkdir -p $ORIG -rsync -av -e "ssh -p $PORT" $ORIG/ backups@$SERVER:/$ORIG/ + +# Sync to remote destination. +echo "Copying backup..." +rsync -avz -e "ssh -p $PORT" $ORIG/ backups@$SERVER:/$ORIG/ |