Moving Volume AND snapshots to another box

Dotty

Contributor
Joined
Dec 10, 2016
Messages
125
I have a FreeNAS box with a 2TB volume and a year's worth of weekly snapshots.
How do I move it to another ZFS device? (FreeNAS, FreeBSD etc)
Id like to preserve obviusly the data, but all the historical snapshots as well.
Im running 9.10.1-U4
Thanks
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Do you just want to move the existing pool to new hardware or are you wanting to copy what you have to a new set of disks in different hardware?
 

Dotty

Contributor
Joined
Dec 10, 2016
Messages
125
I just want to copy what I have. Different Hardware, potentially different OS (but still ZFS).
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
If you can temporarily connect both pools to the same system, you can quickly transfer from one to the other using this method.

First take a snapshot of the pool you want to copy using this command: zfs snapshot -r <poolname>@<snap-name>
The exact command that I use is this: zfs snapshot -r Emily@manual-29Jan2019

The manual snapshot will include all the previous content of the pool, including the older snapshots you are interested in saving.

Once you have a snapshot, you can use zfs send and receive to send that snapshot to another pool using this command:

zfs send -R <poolname>@<snap-name> | zfs receive -F <new-pool>

The exact command I used to backup my existing pool to a new set of disks:

zfs send -R Emily@manual-29Jan2019 | zfs receive -F Irene

If you can't connect both pools to one system, you can still use zfs send to send to another system.
https://docs.oracle.com/cd/E19253-01/819-5461/gbinw/index.html
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
That is very helpful. I will try that today! Thanks a lot.
I hope you got the results you were looking for. Please remember to click that like button
 
Top