Replicating a Dataset with FreeNAS 11.2

FreeNAS makes replicating datasets or ZVOLs easy! In this example, we'll walk through how to set this up on FreeNAS 11.2 (new UI).

Replicating a Dataset with FreeNAS 11.2

FreeNAS makes replicating datasets or ZVOLs easy!  In this example, we'll have one FreeNAS system (Storage-A) replicate its dataset called Infrastructure to another FreeNAS system (Storage-B).  This example is fairly straightforward - tweak it to make it work for you!  Here we go!

Lab Topology

First, we'll browse to our source FreeNAS system and navigate to Tasks > Periodic Snapshot Tasks.  Keep in mind that if you already have periodic snapshots configured, you can skip this step.  These snapshots are mandatory in order to enable replication.  Click the + button (top right).

FreeNAS: Tasks > Periodic Snapshot Tasks on Storage-A

When the add modal appears, choose the following:

Item Example Value Description
Pool/Dataset lun0/Infrastructure The pool or dataset that you wish to replicate.
Recursive Checked This tells FreeNAS to snapshot all datasets under lun0/Infrastructure. For example, if lun0/Infrastructure contains a dataset called Tools, the snapshot will also contain Tools.
Snapshot Lifetime 2 weeks If a file were to be deleted by accident, how long until it is noticed? In other words, how long do you wish to save the snapshot for.

Fields such as begin, end, interval, and day of week are pretty self explanatory.  If you have any questions, please click on the ? to the right of the form field.  Check Enable and click Save once done.

FreeNAS: Tasks > Periodic Snapshot Tasks > Add on Storage-A

Now that we have periodic snapshots configured for our Infrastructure dataset, we can setup replication.  On the source FreeNAS box, navigate to Tasks > Replication Tasks and click on the + (top right).

FreeNAS: Tasks > Replication Tasks on Storage-A

Switch tabs and browse to the destination FreeNAS.  Browse to Tasks > Replication Tasks and click on REPLICATION TOKEN.  Copy the token to your clipboard.

FreeNAS: Tasks > Replication Tasks > Replication Token on Storage-B

Back on the source FreeNAS box, enter the following:

Item Example Value Description
Pool/Dataset lun0/Infrastructure The pool or dataset that you wish to replicate.
Remote ZFS Pool/Dataset lun0/Backups This is the destination pool or dataset where your replicated snapshot will be kept. On Storage-B (destination), we have a dataset called Backups where we'll dump anything we wish to backup.
Recursively Replicate... Checked Again, if there is a pool or dataset underneath our Infrastructure dataset (such as Tools), checking this will take the children's snapshots as well.
Setup Mode Semi-Automatic For the purpose of this example (and for ease of use), we're selecting semi-automatic.
Remote Hostname storage-b.test The IP or hostname of the destination FreeNAS box.
Remote Auth Token token This token is what you copied from the destination machine (see above).

Lastly, click SCAN SSH KEY and it will auto populate.  Once done, save the changes.

FreeNAS: Tasks > Replication Tasks > Add on Storage-A

As you can see, our new replication job has been created!  Keep an eye on the Status column.

FreeNAS: Tasks > Replication Tasks on Storage-A

If you browse back to the destination FreeNAS box, navigate to Storage > Pools.  You should, after a few moments, see your replicated pool or dataset listed under the destination pool or dataset that you selected.

FreeNAS: Storage > Pools on Storage-B

Once the replication task has completed, it'll set the Status column to Up to date.

FreeNAS: Tasks > Replication Tasks on Storage-A


Share Tweet Send
0 Comments
Loading...