How To Create an Exact Duplicate of existing FreeNAS Server

Status
Not open for further replies.

Thousandbuckle

Contributor
Joined
Jul 9, 2014
Messages
136
Hello All,

I am running FreeNAS 9.10.2 with 8 4TB HD's in a RaidZ2 and would like to know what I need to do to have an EXACT working backup of my main FreeNAS server. Ideally if my main FreeNAS box called (fs1) were to fail I could fire up up the back up server called (fs2) and have all files, permissions, jails, etc. that were working on fs1 working the same on fs2. The reason I want this is it took me so long to get my main server fs1 working properly I would hate to have to try and redo all of it again if I had some major failure.

I have put together an exact copy of my main FreeNAS server fs1 and would like to know if it is possible to have FreeNAS make some kind of system backup, both Boot Drive and Data Sets automatically to the backup server fs2. I know about SnaphShots in FreeNAS but I dont fully understand well enough to know if this would work for me. Hoping someone could recommend a step by step approach to creating an EXACT copy of one FreeNAS box to another.
 

storage-junkie

Dabbler
Joined
Jan 17, 2018
Messages
44
Snapshots and replication will handle the data portion of things, but I think you'd also want a backup of your primary machine's config, and you'd restore that to your backup machine in the event of a failover. That would take care of all the 'other' stuff to make your backup machine work exactly like your primary.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I think that with the concept of replication above and backing up the config of fs1 into a dataset that is replicated to fs2 to be restored in the case of your emergency need.

Here's a link to a very helpful way to do that:

Link to Cyberjock's post and the ensuing thread
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Just in case you didn't think of this, don't do a test of the config restore on the same network... (IP address and name conflicts can be painful)
 

Thousandbuckle

Contributor
Joined
Jul 9, 2014
Messages
136
My fs1 FreeNAS box is 22TB. Wouldnt I need that much space just to do the snapshot? Or can the snapshot be sent directly to the backup server fs2?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I think you need to read up a little on snapshots.

In short, taking a snapshot tells the OS not to overwrite or change any of the blocks currently used by the filesystem at that point in time (the filesystem can continue to change after than time using other blocks on the disk).

The snapshot is therefore taking no additional space until the filesystem changes... and then only taking the amount of space relating to the changes that have been made since the snapshot.

The snapshot can be thought of as a moment frozen in time of the file allocation table.

If your filesystem rarely changes by deleting files (or modifying existing ones), then snapshots can continue to be kept with little additional cost to the storage space (just more copies of the FAT and some extra overhead for the system to dance around all of the blocks that are referenced by the snapshots you keep).

After you finish replicating your snapshot (you would then call this replica a backup), you can delete the snapshot (if it's no longer useful) without impacting the current contents of the filesystem (but maybe giving yourself back some free space and a tiny amount of system resources).
 
Status
Not open for further replies.
Top