mirror of
https://github.com/m8tin/cis.git
synced 2026-06-02 14:56:58 +02:00
refactoring
This commit is contained in:
@@ -117,7 +117,9 @@ then
|
|||||||
_RECEIVERS_SNAPSHOT="${3}"
|
_RECEIVERS_SNAPSHOT="${3}"
|
||||||
_RESUME_TOKEN="${4}"
|
_RESUME_TOKEN="${4}"
|
||||||
|
|
||||||
|
_NOW=$(date -u "+%Y-%m-%d_%H:%M:%S")
|
||||||
_ZFS="zpool1/persistent/${_COMPOSITION:?"COMPOSITION missing"}"
|
_ZFS="zpool1/persistent/${_COMPOSITION:?"COMPOSITION missing"}"
|
||||||
|
_NEW_SNAPSHOT="${_ZFS:?"ZFS missing"}@SYNC_${_RECEIVERHOST:?"RECEIVERHOST missing"}_${_NOW:?"NOW missing"}"
|
||||||
|
|
||||||
# Resume mode
|
# Resume mode
|
||||||
if [ "${_RECEIVERS_SNAPSHOT}" == "RESUME" ]; then
|
if [ "${_RECEIVERS_SNAPSHOT}" == "RESUME" ]; then
|
||||||
@@ -132,9 +134,6 @@ then
|
|||||||
&& echo "Failure in sync-send.sh: abort" >&2 \
|
&& echo "Failure in sync-send.sh: abort" >&2 \
|
||||||
&& exit 1
|
&& 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}" == "" ] \
|
[ "${_COMMON_SNAPSHOT}" == "" ] \
|
||||||
&& zfs snapshot "${_NEW_SNAPSHOT}" \
|
&& zfs snapshot "${_NEW_SNAPSHOT}" \
|
||||||
&& zfs send -c -R "${_NEW_SNAPSHOT}" \
|
&& zfs send -c -R "${_NEW_SNAPSHOT}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user