sudo zpool create -o ashift=12 backup /dev/disk/by-id/XXXX
Take a snapshot of the zpool you wish to backup
sudo zfs snapshot -r srv@backup-$(date '+%Y-%m-%d')
Send the full snapshot to the external drive, this may take some time.
sudo zfs send -R srv@backup-2023-08-30 | pv | sudo zfs recv -F backup
Hold snapshots, this prevents accidental deletion for later incremental reference.
sudo zfs hold -r keep srv@backup-2023-08-30
sudo zfs hold -r keep backup@backup-2023-08-30
Export the external zpool so your machine isn't looking for it
sudo zpool export backup
sudo zpool import backup
Take a snapshot of the zpool you wish to backup
sudo zfs snapshot -r srv@backup-$(date '+%Y-%m-%d')
Send the incremental snapshot to the external drive, this may take some time.
sudo zfs send -R -i srv@backup-2023-08-30 srv@backup-2023-08-31 | pv | sudo zfs recv -F backup
Hold new snapshots, this prevents accidental deletion for later incremental reference.
sudo zfs hold -r keep srv@backup-2023-08-31
sudo zfs hold -r keep backup@backup-2023-08-31
Release old snapshots to allow deletion.
sudo zfs release -r keep srv@backup-2023-08-30
sudo zfs release -r keep backup@backup-2023-08-30
Delete old snapshots to free up space.
sudo zfs destroy -r srv@backup-2023-08-30
sudo zfs destroy -r backup@backup-2023-08-30
Export the external zpool so your machine isn't looking for it
sudo zpool export backup
sudo zpool import backup
Send the snapshot to the data volume, this may take some time.
sudo zfs send backup@backup-2023-08-31 | pv | sudo zfs recv srv
Roll back to the snapshot to make the data active
sudo zfs rollback srv@backup-2023-08-31
Export the external zpool so your machine isn't looking for it
sudo zpool export backup