Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions timemachine
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,10 @@ if link_exists "${DEST}/${BACKUP_LATEST}"; then
BTYPE="incremental"

logmsg "Starting incremental backup"
logmsg "\$ rsync $* $( escape_path "${SRC}" ) $( escape_path "${DEST}/${BACKUP_INPROGRESS}" )"
logmsg "\$ rsync $* ${SRC} ${DEST}/${BACKUP_INPROGRESS}"

cmd="rsync \
-e \"ssh ${SSH_ARGS}\" \
set -- rsync \
-e "ssh ${SSH_ARGS}" \
--recursive \
--perms \
--owner \
Expand All @@ -441,16 +441,16 @@ if link_exists "${DEST}/${BACKUP_LATEST}"; then
--delete-excluded \
--partial-dir=${RSYNC_PARTIAL} \
--link-dest=../${BACKUP_LATEST} \
$* \
$( escape_path "${SRC}" ) $( escape_path "${DEST}/${BACKUP_INPROGRESS}" )"
"$@" \
"${SRC}" "${DEST}/${BACKUP_INPROGRESS}"
else
BTYPE="full"

logmsg "Starting full backup"
logmsg "\$ rsync $* $( escape_path "${SRC}" ) $( escape_path "${DEST}/${BACKUP_INPROGRESS}" )"
logmsg "\$ rsync $* ${SRC} ${DEST}/${BACKUP_INPROGRESS}"

cmd="rsync \
-e \"ssh ${SSH_ARGS}\" \
set -- rsync \
-e "ssh ${SSH_ARGS}" \
--recursive \
--perms \
--owner \
Expand All @@ -460,11 +460,11 @@ else
--delete \
--delete-excluded \
--partial-dir=${RSYNC_PARTIAL} \
$* \
$( escape_path "${SRC}" ) $( escape_path "${DEST}/${BACKUP_INPROGRESS}" )"
"$@" \
"${SRC}" "${DEST}/${BACKUP_INPROGRESS}"
fi

if ! eval "${cmd}"; then
if ! "$@"; then
logerr "${MY_NAME} Backup has failed"
exit 1
fi
Expand Down