Migrate to new server by importing pool

I need to migrate from one server to another so that the existing hardware can be decommissioned.

While I could set up the new system identically and copy all the files over the network, I thought it would be much quicker to take the drives out of the old system, instal them in the new system, import, and then completely clone the pool.

The new system is an otherwise identical config (Exception being the drives are slightly bigger)

Once I’ve imported the pool, what’s the best way to copy the data?
Reading other forum posts I could just use the cp command, or with a ZFS snapshot:
zfs snapshot oldpool/data@transfer
zfs send oldpool/data@transfer | zfs receive newpool/data

Some people say the snapshot is slower but has the advantage of preserving additional metadata. Is there an easy way to migrate the ACL structure along as well?

I know similar questions have been asked before so apologies for the repeat, but I haven’t been able to find anybody doing the whole ‘Move discs between machines’ deal

It is not.


Snapshot + zfs send/recv


You can add the -Rw parameters to the send command, which will do a raw stream full filesystem replication, including all children, snapshots, clones, and preserving everything, including encryption and compression.

well that answers that then

what does @transfer do / mean? Sometimes the command is written as @migrate

That’s the name of the snapshot being created and replicated.

The first command lacks the needed -r flag to recursively snapshot everything below the dataset “data”.

1 Like