Update symlink and remove .inprogress only after success (#264)
This commit is contained in:
+4
-1
@@ -613,11 +613,14 @@ while : ; do
|
|||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Add symlink to last backup
|
# Add symlink to last backup
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
if [ "$EXIT_CODE" = 0 ]; then
|
||||||
|
# Create the latest symlink only when rsync succeeded
|
||||||
fn_rm_file "$DEST_FOLDER/latest"
|
fn_rm_file "$DEST_FOLDER/latest"
|
||||||
fn_ln "$(basename -- "$DEST")" "$DEST_FOLDER/latest"
|
fn_ln "$(basename -- "$DEST")" "$DEST_FOLDER/latest"
|
||||||
|
|
||||||
|
# Remove .inprogress file only when rsync succeeded
|
||||||
fn_rm_file "$INPROGRESS_FILE"
|
fn_rm_file "$INPROGRESS_FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
exit $EXIT_CODE
|
exit $EXIT_CODE
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user