I'm repeating much of what jlliagre said, but with additions for descendent file systems. (Mostly so I have a reference when I forget.)
If you have sub-filesystems you'll want to use the -r
flag on the zfs snapshot command, and the -r
or -R
flag on the zfs send
command. The uppercase -R
moves all properties, snapshots and clones.
To move an entire pool:
zfs snapshot -r sourcepool@moving
zfs send -R sourcepool@moving | zfs receive -F destpool
then to sync the changes for a shorter migration period
shut down applications, shutdown samba, nfs
zfs snapshot -r sourcepool@moving2
zfs send -Ri sourcepool@moving sourcepool@moving2 | zfs receive -F destpool
If you are creating multiple intermediary snapshots for the migration, read the man page about the zfs send -I
switch.