From 7066c1678b3d71fb9118e00a5f299645bd27386d Mon Sep 17 00:00:00 2001 From: m8in Date: Sat, 18 Apr 2026 15:57:47 +0200 Subject: [PATCH] refactoring --- script/host/zfs/composition-sync/sync-send.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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}" \