From 9cd4f285688a1f92684b7dda9724759b66edf656 Mon Sep 17 00:00:00 2001 From: Carlo Landmeter Date: Wed, 11 Jul 2018 08:49:49 +0000 Subject: various changes - make domain name configurable - prepend RBU to global veriables - cleanup --- profiles/backup-sync | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'profiles/backup-sync') diff --git a/profiles/backup-sync b/profiles/backup-sync index d4514ea..394d667 100755 --- a/profiles/backup-sync +++ b/profiles/backup-sync @@ -3,17 +3,16 @@ echo "Sending backup to backup server" # make sure the destination directory exists -ssh "$BACKUP_SERVER" mkdir -p $FQDN/week +ssh "$RBU_SERVER" mkdir -p $FQDN/week # get the name of the renamed backup and also rename # this backup on the remote to prevent dulpicate upload -CURR_BACKUP=$(ls -t "$BACKUP_LOCATION" | sed -n 2p) +CURR_BACKUP=$(ls -t "$RBU_LOCATION" | sed -n 2p) if [ -n "$CURR_BACKUP" ]; then - HOSTNAME=$(hostname) - ssh "$BACKUP_SERVER" mv -f \ - $FQDN/week/$HOSTNAME.apkovl.tar.gz${SUFFIX} \ + ssh "$RBU_SERVER" mv -f \ + $FQDN/week/$(hostname).apkovl.tar.gz${SUFFIX} \ $FQDN/week/$CURR_BACKUP fi -rsync -av --delete-after "$BACKUP_LOCATION/" \ - "$BACKUP_SERVER":"$FQDN"/week +rsync -av --delete-after "$RBU_LOCATION/" \ + "$RBU_SERVER":"$FQDN"/week -- cgit v1.2.3