This example migrates an incremental ZFS dataset from the source system to shared storage, then to an already prepared ZFS file system on the target system.
This procedure is used in situations when there is a lapse between the time that the initial full ZFS data is captured on the source and then fully restored on the target. If the source system remained in production during the initial migration, you can perform an incremental zfs send to migrate only the changed data.
root@Source# zfs snapshot -r zone01@snap02 root@Source# zfs list -t snapshot NAME USED AVAIL REFER MOUNTPOINT zone01@snap01 0 - 35K -
The zfs send command offers these options for generating incremental streams:
-R – Replicates the file system up to the named snapshot.
-I – Generates a stream package that sends all intermediary snapshots from the first snapshot to the second snapshot.
This example sends the incremental snapshot to shared storage.
Note – For the appropriate path to the pigz command, see the Secondary Commands table in Data Migration Commands.
root@Source# zfs send -R -I zone01@snap01 zone01@snap02 | pigz > /SharedStorage/zone02.gz
Note – For the appropriate path to the pigz command, see the Secondary Commands table in Data Migration Commands.
root@Target# pigz -dc -f /SharedStorage/zfs_send/test_snapI2.gz | zfs receive zone01