From 6de3c9877c776eacf669d0dfe8d2c8b40719ad81 Mon Sep 17 00:00:00 2001 From: Tonnerre Lombard Date: Wed, 4 Feb 2009 08:25:35 +0100 Subject: [PATCH] Keep a symlink to the current backup around. This allows us to establish automatic restore features (e.g. through Puppet file facts). --- ccollect.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ccollect.sh b/ccollect.sh index e14dcfc..77f2c5c 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -561,6 +561,9 @@ while [ "${i}" -lt "${no_sources}" ]; do _techo "Finished backup (rsync return code: $ret)." if [ "${ret}" -ne 0 ]; then _techo "Warning: rsync exited non-zero, the backup may be broken (see rsync errors)." + else + [ -e "${destination}/${INTERVAL}.current" ] && rm -f "${destination}/${INTERVAL}.current" + ln -s "$(basename "${destination_full}")" "${destination}/${INTERVAL}.current" fi #