ZFS Snapshotting With Incremental Send/Receive
ZFS Snapshotting With Incremental Send/Recieve
This serves as a note to myself on the process of creating a ZFS snapshot
and sending the incremental from the last snapshot it to my backup
server. It maybe useful for others by substituting d=cachecove/zwift
with your ZFS pool / dataset name.
ds=cachecove/zwift
set -x
from="$(ssh gore zfs list -H -t snapshot -o name -s creation "$ds" | tail -n 1)"
d="$(date -Imin)"
zfs snapshot "$ds@$d"
printf "Sending from %s to %s\n" "$from" "$ds@$d"
zfs send -i "$from" "$ds@$d" | ssh gore zfs receive "$ds"