Keep a symlink to the current backup around. This allows us to

establish automatic restore features (e.g. through Puppet file
facts).
This commit is contained in:
Tonnerre Lombard 2009-02-04 08:25:35 +01:00
parent 1943bfd244
commit 6de3c9877c

View file

@ -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
#