Commit 616b1d9e authored by Steffen Zieger's avatar Steffen Zieger

Add 'current' symlink to backup destinations

parent 7a7dec77
Pipeline #1551 passed with stage
in 41 seconds
......@@ -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
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment