diff --git a/proxmox/vzdump-hook-hardlink-latest.sh b/proxmox/vzdump-hook-hardlink-latest.sh index 9fd8b34..b496f9f 100755 --- a/proxmox/vzdump-hook-hardlink-latest.sh +++ b/proxmox/vzdump-hook-hardlink-latest.sh @@ -70,7 +70,7 @@ main() { # {{{ # If backup is complete {{{ if [ "${phase}" = "backup-end" ]; then ## Get TARGET's file extension - target_archive_extension="$(printf '%s' "${TARGET}" | cut --delimiter="." --fields=1 --complement)" + target_archive_extension="$(printf '%s' "${TARGET}" | sed -n "s/.*\.\([[:alnum:]]*\.[[:alnum:]]*\)$/\1/p")" ## Set path for LATEST archive file latest_archive="${dumpdir}/vzdump-${vmtype}-${vmid}-latest.${target_archive_extension}"