forked from ungleich-public/ccollect
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:
parent
1943bfd244
commit
6de3c9877c
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue