Migrate ZFS Pool Using Snapshot

The pool in my FreeNAS was made up of old, small drives, and it was time to upgrade today. I needed to migrate my datasets from the old pool to the new.

I took a snapshot in the GUI.

Then I got a list of snapshots in the CLI.

zfs list -t snapshot

I started a tmux instance, but screen would be fine too.

tmux

I sent the snapshot to the new pool as described in this r/freenas post.

https://www.reddit.com/r/freenas/comments/bl0ra0/restoring_a_snapshot_to_new_hard_drives/ep2gjpu?utm_source=share&utm_medium=web2x

zfs send -Rv [source_pool]@[snapshot] | zfs receive -vdF [destination_pool]

My new pool was already created, so I had to use -F on the zfs receive. My understanding is that the destination pool might have been overwritten. It was empty so I’m not sure.

I got an error at the end because my pool was already mounted, so I went back and checked, but even with the error, all the datasets were migrated perfectly.

One oddity is that the compression ratios were slightly different.

Snapshots were not migrated, as expected.

I had a couple permissions issues and had to rerun the ACLs from the FreeNAS GUI.