diff --git a/script/host/zfs/composition-sync/sync-send.sh b/script/host/zfs/composition-sync/sync-send.sh index 56576f7..7df9368 100755 --- a/script/host/zfs/composition-sync/sync-send.sh +++ b/script/host/zfs/composition-sync/sync-send.sh @@ -117,7 +117,9 @@ then _RECEIVERS_SNAPSHOT="${3}" _RESUME_TOKEN="${4}" + _NOW=$(date -u "+%Y-%m-%d_%H:%M:%S") _ZFS="zpool1/persistent/${_COMPOSITION:?"COMPOSITION missing"}" + _NEW_SNAPSHOT="${_ZFS:?"ZFS missing"}@SYNC_${_RECEIVERHOST:?"RECEIVERHOST missing"}_${_NOW:?"NOW missing"}" # Resume mode if [ "${_RECEIVERS_SNAPSHOT}" == "RESUME" ]; then @@ -132,9 +134,6 @@ then && echo "Failure in sync-send.sh: abort" >&2 \ && exit 1 - # Now create the first or a further sync-snapshot as end-point. - _NEW_SNAPSHOT="${_ZFS}@SYNC_${_RECEIVERHOST:?"RECEIVERHOST missing"}_$(date -u "+%Y-%m-%d_%H:%M:%S")" - [ "${_COMMON_SNAPSHOT}" == "" ] \ && zfs snapshot "${_NEW_SNAPSHOT}" \ && zfs send -c -R "${_NEW_SNAPSHOT}" \