Fix something with local dir creation
This commit is contained in:
parent
15794e13a5
commit
efb607aff8
@ -55,7 +55,11 @@ RSYNC_STRUCTURE_CMD=${RSYNC_BASE_CMD[*]}
|
||||
RSYNC_STRUCTURE_CMD+=(--relative $BACKUP_CONTENTS_PATH $BACKUP_TARGET)
|
||||
|
||||
RSYNC_DATA_CMD=${RSYNC_BASE_CMD[*]}
|
||||
RSYNC_DATA_CMD+=(--delete --inplace $BACKUP_EXCLUSIONS --backup --backup-dir=../$BACKUP_ARCHIVE $BACKUP_DIRECTORY $BACKUP_TARGET/$BACKUP_CONTENTS_PATH)
|
||||
RSYNC_DATA_CMD+=(--delete --inplace $BACKUP_EXCLUSIONS)
|
||||
if [ ! -z "$BACKUP_ARCHIVE" ]; then
|
||||
RSYNC_DATA_CMD+=(--backup --backup-dir=../$BACKUP_ARCHIVE)
|
||||
fi
|
||||
RSYNC_DATA_CMD+=($BACKUP_DIRECTORY $BACKUP_TARGET/$BACKUP_CONTENTS_PATH)
|
||||
|
||||
echo "Starting backup. Target: $BACKUP_BASE_PATH. Archive: $BACKUP_ARCHIVE"
|
||||
|
||||
@ -66,6 +70,7 @@ echo "Done"
|
||||
|
||||
### Create local model of the remote's backup directory tree and send it ###
|
||||
echo "Directory structure..."
|
||||
cd ~/
|
||||
mkdir -p "$BACKUP_CONTENTS_PATH"
|
||||
eval ${RSYNC_STRUCTURE_CMD[*]} || exit 1
|
||||
echo "Done"
|
||||
|
Loading…
Reference in New Issue
Block a user