diff --git a/backup2me.sh b/backup2me.sh index 6f324f0..30f9c5d 100755 --- a/backup2me.sh +++ b/backup2me.sh @@ -41,20 +41,19 @@ BACKUP_ARCHIVE=$7 BACKUP_ROOT_PATH="$(cat /etc/hostname)" BACKUP_BASE_PATH="$BACKUP_ROOT_PATH/$BACKUP_ROOT" BACKUP_CONTENTS_PATH="$BACKUP_BASE_PATH/_backup/" -BACKUP_ARCHIVE_PATH="$BACKUP_BASE_PATH/$BACKUP_ARCHIVE" -echo "Starting backup" +echo "Starting backup. Target: $BACKUP_BASE_PATH. Archive: $BACKUP_ARCHIVE" ### Before Script ### eval "$BEFORE_SCRIPT" ### Create local model of the remote's backup directory tree and send it ### mkdir -p "$BACKUP_CONTENTS_PATH" -rsync --timeout=30 -avzhP --relative "$BACKUP_CONTENTS_PATH" "$BACKUP_TARGET" +rsync --timeout=30 -avzhP --relative $BACKUP_CONTENTS_PATH $BACKUP_TARGET ### Backup home directory except some unwanted files ### -rsync --timeout=30 -avzhP --delete --inplace $BACKUP_EXCLUSIONS --backup-dir="../$BACKUP_ARCHIVE_PATH" "$BACKUP_DIRECTORY" "$BACKUP_TARGET/$BACKUP_CONTENTS_PATH" +rsync --timeout=30 -avzhP --delete --inplace $BACKUP_EXCLUSIONS --backup --backup-dir=../$BACKUP_ARCHIVE $BACKUP_DIRECTORY $BACKUP_TARGET/$BACKUP_CONTENTS_PATH ### Remove local model of the backup directory tree ### rm -R "$BACKUP_ROOT_PATH"