diff --git a/ccollect b/ccollect index 01c5d05..b4af2f1 100755 --- a/ccollect +++ b/ccollect @@ -861,6 +861,16 @@ while [ "${source_no}" -lt "${no_sources}" ]; do _techo "Warning: rsync failed with return code $ret." 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 #