FreeNAS - Automated Configuration Back Up

From 45 Drives Technical Information Wiki
Revision as of 12:20, 24 March 2016 by Bkelly (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

FreeNAS has a feature that you can make configuration back up of your NAS in the event your boot USB should ever fail.

This is NOT a backup of your data in the NAS. This back up saves the information regarding: Users, Shares, and tasks or settings your tweaked. So having this backup can make replacing a failed USB stick a breeze.


Edit March 24th 2016: We now ship our FreeNAS pods with redundant SSD boot drives rather than a USB stick.

This mean our auto back config changes as well. The same concept and commands are still being used we just back up to the USB stick rather then the SSDs.



Pre March 24th 2016: There are two 120GB SSDs that are included with the Storinator, but since FreeNAS boots from a USB those SSDs are free to use!

Each 120GB SSD was partitioned into a 2.5GB section and mirrored for back up and the rest of the space was left for the end user to decide what to do with it.

FreeNASssd.png




This automated process was achieved by setting a cron job directly through the FreeNAS GUI using the following command:

  *cp /data/freenas-v1.db /mnt/backup/`date \+%Y\%m\%d`_`cat /etc/version | cut -d'-' -f2`_`cat /etc/version | cut -d'-' -f4`.db 

This generates a back up of the current FreeNAS configuration and names it "Date(Y/M/D)_FreeNASVersion.db"

It will be placed in the preconfigured pool called "Backup". It is recommended that you regularly pull the backed up config files to a local machine. This can be done with a FTP client such as filezilla, just be sure to turn the FTP service in the FreeNAS webGUI.

By default the back up process makes a copy of the config file on the 1st and 15th of every month. This can easily be changed by:

  * Go to the FreeNAS WebGUI, select "Tasks" from the menu bar
  * Select the cron job called "Auto Back Up" from the list and click "Edit"
  * In the window that pops up you can configure when the job will run by tweaking either the minutes hour or day of the month.


To restore your configuration:

* Burn a new copy of FreeNAS onto a USB stick.
* Note the version of FreeNAS your config file corresponds to. you must use the same version when restoring the configuration.
* Boot into your freshly installed FreeNAS and navigate to the webGUI.
* Go to "System -> General" and then click "Upload Config" and choose the ".db" file you created when you set up your configuration.
* The system will then reboot with your old configuration!
* You will want to install the highpoint drivers if you are using R750 cards. Please see the following page: Installing Highpoint Drivers on FreeNAS