add_lzop_to_copy_containers

This commit is contained in:
Milan Meduna 2022-01-28 15:40:40 +01:00
parent 3942645387
commit 79267154c3

View file

@ -77,7 +77,7 @@ fi
echo "Sending first snapshot" echo "Sending first snapshot"
echo "Sending "$SNAP_TO_SEND_FIRST"" echo "Sending "$SNAP_TO_SEND_FIRST""
zfs send "$SNAP_TO_SEND_FIRST" | pv | ssh "$DEST_IP" -p $DEST_PORT zfs recv -o recordsize="$DATASET_RECORDSIZE_VAR" -o atime="$DATASET_ATIME_VAR" -o relatime="$DATASET_RELATIME_VAR" -o quota="$DATASET_QUOTA_VAR" "$DEST_ZPOOL"/lxd/storage/containers/"$CONT_VAR"; (($? != 0)) && { echo "SSH command to send first snapshot exited with non-zero"; exit 1; } zfs send "$SNAP_TO_SEND_FIRST" | lzop | pv | ssh "$DEST_IP" -p $DEST_PORT "lzop -d | zfs recv -o recordsize="$DATASET_RECORDSIZE_VAR" -o atime="$DATASET_ATIME_VAR" -o relatime="$DATASET_RELATIME_VAR" -o quota="$DATASET_QUOTA_VAR" "$DEST_ZPOOL"/lxd/storage/containers/"$CONT_VAR"; (($? != 0)) && { echo "SSH command to send first snapshot exited with non-zero"; exit 1; }"
echo "Sleep 2" echo "Sleep 2"
@ -96,7 +96,7 @@ done
echo "Sending second snapshot" echo "Sending second snapshot"
echo "Sending "$SNAP_TO_SEND_FIRST" to "$SNAP_TO_SEND_SECOND" with -I parameter" echo "Sending "$SNAP_TO_SEND_FIRST" to "$SNAP_TO_SEND_SECOND" with -I parameter"
zfs send -I "$SNAP_TO_SEND_FIRST" "$SNAP_TO_SEND_SECOND" | pv | ssh "$DEST_IP" -p $DEST_PORT zfs recv -o recordsize="$DATASET_RECORDSIZE_VAR" -o atime="$DATASET_ATIME_VAR" -o relatime="$DATASET_RELATIME_VAR" -o quota="$DATASET_QUOTA_VAR" "$DEST_ZPOOL"/lxd/storage/containers/"$CONT_VAR" -F; (($? != 0)) && { echo "SSH command to send second snapshot exited with non-zero"; exit 1; } zfs send -I "$SNAP_TO_SEND_FIRST" "$SNAP_TO_SEND_SECOND" | lzop | pv | ssh "$DEST_IP" -p $DEST_PORT "lzop -d | zfs recv -o recordsize="$DATASET_RECORDSIZE_VAR" -o atime="$DATASET_ATIME_VAR" -o relatime="$DATASET_RELATIME_VAR" -o quota="$DATASET_QUOTA_VAR" "$DEST_ZPOOL"/lxd/storage/containers/"$CONT_VAR" -F; (($? != 0)) && { echo "SSH command to send second snapshot exited with non-zero"; exit 1; }"
echo "Sleep 2" echo "Sleep 2"
sleep 2 sleep 2
@ -111,7 +111,7 @@ done
echo "Sending third snapshot" echo "Sending third snapshot"
echo "Sending "$SNAP_TO_SEND_SECOND" to "$SNAP_TO_SEND_THIRD"" echo "Sending "$SNAP_TO_SEND_SECOND" to "$SNAP_TO_SEND_THIRD""
zfs send -i "$SNAP_TO_SEND_SECOND" "$SNAP_TO_SEND_THIRD" | pv | ssh "$DEST_IP" -p $DEST_PORT zfs recv -o recordsize="$DATASET_RECORDSIZE_VAR" -o atime="$DATASET_ATIME_VAR" -o relatime="$DATASET_RELATIME_VAR" -o quota="$DATASET_QUOTA_VAR" "$DEST_ZPOOL"/lxd/storage/containers/"$CONT_VAR" -F; (($? != 0)) && { echo "SSH command to send third snapshot exited with non-zero"; exit 1; } zfs send -i "$SNAP_TO_SEND_SECOND" "$SNAP_TO_SEND_THIRD" | lzop | pv | ssh "$DEST_IP" -p $DEST_PORT "lzop -d | zfs recv -o recordsize="$DATASET_RECORDSIZE_VAR" -o atime="$DATASET_ATIME_VAR" -o relatime="$DATASET_RELATIME_VAR" -o quota="$DATASET_QUOTA_VAR" "$DEST_ZPOOL"/lxd/storage/containers/"$CONT_VAR" -F; (($? != 0)) && { echo "SSH command to send third snapshot exited with non-zero"; exit 1; }"
echo "Sleep 2" echo "Sleep 2"
sleep 2 sleep 2
@ -126,7 +126,7 @@ done
echo "Sending fourth snapshot" echo "Sending fourth snapshot"
echo "Sending "$SNAP_TO_SEND_THIRD" to "$SNAP_TO_SEND_FOURTH"" echo "Sending "$SNAP_TO_SEND_THIRD" to "$SNAP_TO_SEND_FOURTH""
zfs send -i "$SNAP_TO_SEND_THIRD" "$SNAP_TO_SEND_FOURTH" | pv | ssh "$DEST_IP" -p $DEST_PORT zfs recv -o recordsize="$DATASET_RECORDSIZE_VAR" -o atime="$DATASET_ATIME_VAR" -o relatime="$DATASET_RELATIME_VAR" -o quota="$DATASET_QUOTA_VAR" "$DEST_ZPOOL"/lxd/storage/containers/"$CONT_VAR" -F; (($? != 0)) && { echo "SSH command to send fourth snapshot exited with non-zero"; exit 1; } zfs send -i "$SNAP_TO_SEND_THIRD" "$SNAP_TO_SEND_FOURTH" | lzop | pv | ssh "$DEST_IP" -p $DEST_PORT "lzop -d | zfs recv -o recordsize="$DATASET_RECORDSIZE_VAR" -o atime="$DATASET_ATIME_VAR" -o relatime="$DATASET_RELATIME_VAR" -o quota="$DATASET_QUOTA_VAR" "$DEST_ZPOOL"/lxd/storage/containers/"$CONT_VAR" -F; (($? != 0)) && { echo "SSH command to send fourth snapshot exited with non-zero"; exit 1; }"
echo "Sleep 2" echo "Sleep 2"
sleep 2 sleep 2
@ -147,7 +147,7 @@ done
echo "Sending fifth snapshot" echo "Sending fifth snapshot"
echo "Sending "$SNAP_TO_SEND_FOURTH" to "$SNAP_TO_SEND_FIFTH"" echo "Sending "$SNAP_TO_SEND_FOURTH" to "$SNAP_TO_SEND_FIFTH""
zfs send -i "$SNAP_TO_SEND_FOURTH" "$SNAP_TO_SEND_FIFTH" | pv | ssh "$DEST_IP" -p $DEST_PORT zfs recv -o recordsize="$DATASET_RECORDSIZE_VAR" -o atime="$DATASET_ATIME_VAR" -o relatime="$DATASET_RELATIME_VAR" -o quota="$DATASET_QUOTA_VAR" "$DEST_ZPOOL"/lxd/storage/containers/"$CONT_VAR" -F; (($? != 0)) && { echo "SSH command to send fifth snapshot exited with non-zero"; exit 1; } zfs send -i "$SNAP_TO_SEND_FOURTH" "$SNAP_TO_SEND_FIFTH" | lzop | pv | ssh "$DEST_IP" -p $DEST_PORT "lzop -d | zfs recv -o recordsize="$DATASET_RECORDSIZE_VAR" -o atime="$DATASET_ATIME_VAR" -o relatime="$DATASET_RELATIME_VAR" -o quota="$DATASET_QUOTA_VAR" "$DEST_ZPOOL"/lxd/storage/containers/"$CONT_VAR" -F; (($? != 0)) && { echo "SSH command to send fifth snapshot exited with non-zero"; exit 1; }"
if [ $bionic_checker == bionic ] if [ $bionic_checker == bionic ]
then then