Incremental ZFS send/recv

Should you need to move a ZFS disk from one ZFS pool to another with minimal downtime, you can do so using ZFS snapshots and sending the data/disk from the source to the destination incrementally.

First, start with creating the initial snapshot:

zfs snapshot -r disk-on-pool@snapshot1

-r allows for a recursive snapshot

Next, send the initial snapshot to the destination:

zfs send -vRI -- disk-on-source-pool@snapshot1 | cstream -t 1153433600  | ssh -o 'BatchMode=yes' root@destination -- zfs recv -Fu -- disk-on-dest-pool

Once the initial snapshot has been successfully transferred to the new/destination ZFS pool, another snapshot can be made at the source with the following:

zfs snapshot -r disk-on-pool@snapshot2

Now for the incremental transfer of snapshots:

zfs send -vRI disk-on-source-pool@snapshot1 disk-on-source-pool@snapshot2 | cstream -t 1153433600  | ssh -o 'BatchMode=yes' root@destination -- zfs recv -Fu -- disk-on-dest-pool

Should you wish to make subsequent incremental snapshots and transfers, simply increase the snapshot number (snapshot3, snapshot4 etc) and change the above command as follows:

zfs send -vRI disk-on-source-pool@snapshot1 disk-on-source-pool@snapshot3 | cstream -t 1153433600  | ssh -o 'BatchMode=yes' root@destination -- zfs recv -Fu -- disk-on-dest-pool

This will transfer all snapshots in-between and including the first and last snapshots specified. I.e snapshot1, snapshot2, and snapshot3.