Add 'current' symlink to backup destinations
This commit is contained in:
parent
7a7dec7751
commit
616b1d9e3e
1 changed files with 10 additions and 0 deletions
10
ccollect
10
ccollect
|
@ -861,6 +861,16 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
|
||||||
_techo "Warning: rsync failed with return code $ret."
|
_techo "Warning: rsync failed with return code $ret."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create symlink to newest backup
|
||||||
|
#
|
||||||
|
# shellcheck disable=SC2010
|
||||||
|
latest_dir="$(ls -${TSORT}p1 "${ddir}" | grep '/$' | head -n 1)" || \
|
||||||
|
_exit_err "Failed to list content of ${ddir}."
|
||||||
|
|
||||||
|
ln -snf "${ddir}${latest_dir}" "${ddir}current" || \
|
||||||
|
_exit_err "Failed to create 'current' symlink."
|
||||||
|
|
||||||
#
|
#
|
||||||
# post_exec
|
# post_exec
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue