diff --git a/proxmox/vzdump-hook-hardlink-latest.sh b/proxmox/vzdump-hook-hardlink-latest.sh index b496f9f..de57e13 100755 --- a/proxmox/vzdump-hook-hardlink-latest.sh +++ b/proxmox/vzdump-hook-hardlink-latest.sh @@ -67,6 +67,11 @@ error_message() { # {{{ main() { # {{{ + debug_message "main − \ +ARGS=${ARGS} +env=$(env)" + + # If backup is complete {{{ if [ "${phase}" = "backup-end" ]; then ## Get TARGET's file extension @@ -76,7 +81,7 @@ main() { # {{{ ## hardlink TARGET archive to LATEST debug_message "hardlink TARGET archive (${target_archive}) to \ -LATEST (${latest_archive})." >> "${temp_log_file}" +LATEST (${latest_archive})." ln --force "${target_archive}" "${latest_archive}" fi # }}} @@ -88,15 +93,12 @@ LATEST (${latest_archive})." >> "${temp_log_file}" ## hardlink TARGET log to LATEST debug_message "hardlink TARGET logs (${logfile}) to \ -LATEST (${latest_log})." >> "${temp_log_file}" +LATEST (${latest_log})." ln --force "${logfile}" "${latest_log}" fi # }}} - debug_message "main − \ -ARGS=${ARGS} -env=$(env) ----" + debug_message "---" } # }}}