From 28735b181586606e107a471163e8c6b109016446 Mon Sep 17 00:00:00 2001 From: Robert Bruce Park Date: Fri, 15 Nov 2013 12:01:52 -0800 Subject: [PATCH] Create "latest" symlink pointing at the most recent completed backup. --- rsync_tmbackup.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rsync_tmbackup.sh b/rsync_tmbackup.sh index 3aa0712..66eab2e 100644 --- a/rsync_tmbackup.sh +++ b/rsync_tmbackup.sh @@ -279,6 +279,10 @@ while [ "1" ]; do exit $RSYNC_EXIT_CODE fi + # Force creation of 'latest' symlink pointing at the new $DEST. + rm -rf -- "$DEST_FOLDER/latest" + ln -vs "$(basename "$DEST")" "$DEST_FOLDER/latest" + rm -- "$INPROGRESS_FILE" # TODO: grep for "^rsync error:.*$" in log fn_log_info "Backup completed without errors."