Migrating data+snapshots from one FreeNAS box to another

Status
Not open for further replies.

leonroy

Explorer
Joined
Jun 15, 2012
Messages
77
I have a FreeNAS box with a single ZFS volume and several datasets on it. Each dataset has a few hundred snapshots.

I wanted to take the box down for some long term maintenance and was wondering what best practises are for migrating my data from the first box to a new second box whilst keeping my snapshots intact.

The second box already has a few datasets and enough room to handle the additional data.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
Zfs replication
I've always wondered about this as well. So let's assume we replicate a dataset snapshot from system A to B and then shut down A. We then configure the shares on B to be accessible and use it or some considerable amount of time. So now the files on B are no longer the same as A. When it's time to bring A back online, do we have to completely destroy the original dataset and snapshots in order to replicate from B to A? Is it advisable to use the GUI to do this one time replication? the CLI?
 

leonroy

Explorer
Joined
Jun 15, 2012
Messages
77
Ok, followed the FreeNAS Users Guide section on replication. Verified steps in the Troubleshooting section to confirm it works and that I can successfully ssh and zfs send from the PUSH to the PULL server.

How do I kick off the list of replication tasks in the FreeNAS WebGui without waiting till midnight?
 
Last edited:

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
I found it is much quicker to perform a CLI replication that will make the exact copy of server A to server B.
The GUI version will be excruciatingly slow when updating small snapshots.
 

Fei

Explorer
Joined
Jan 13, 2014
Messages
80
Hi

you can use zfs send & recv on CLI.
follow steps as below , you will migrate server A all snapshot to server B

Ex:
Server A
volume name = volA
Dataset name = A
snapshot : volA/A@day1 , volA/A@day2 , volA/A@day3........volA/A@day100

Server B
volume name = volB

<full migration>
Code:
zfs send volA/A@day1 | ssh root@<remote IP or host> zfs recv -Fv volB/A


<incremental migration>
Code:
zfs send -I volA/A@day1 volA/A@day100 | ssh root@<remote IP or host> zfs recv -ev volB/A
 
Last edited:
Status
Not open for further replies.
Top