How do I migrate a ZFS system to new hardware?

If you're keeping the disks, hook them up to your ESXi machine, pass them through to the VM (raw), and zpool import -f ${pool}


How are you sharing your data on the pool? Are you presenting block storage or NFS? If NFS, you can scp or rsync the data to the new system. Otherwise, if you need to preserve your ZFS attributes, etc., you can use zfs send and zfs receive over netcat (nc) or ssh.

The following will send the snapshot named "move" of "filesystem" in zpool "tank" to a new server at 192.168.1.2 with destination tank/filesystem.

On the old system:

# zfs send tank/filesystem@move | nc 192.168.1.2 3001

On the new system:

# nc -l -p 3001 -vvv | time zfs recv -v -p tank