How to backup FreeNAS configuration file and restore it

I have FreeNAS server configured to backup data for my office. How do I backup FreeNAS configuration file?
You need to backup FreeNAS configuration file safely. Backing up the configuration file provides you failsafe mechanism. Sometimes upgrades may fail, or you may experience hardware disk failures. You can go back to a previously good known state of FreeNAS server. It is also possible to do a fresh installation of FreeNAS server and go back to old configuration to save time. This page show how to backup FreeNAS configuration and restore it when needed.

How to backup FreeNAS configuration file

The procedure is as follows for backing up the FreeNAS configuration:

  1. Login to FreeNAS web interface
  2. Click on the System
  3. Click on the General tab
  4. Scroll to the bottom of the screen and select the Save config button. Click on the Ok button.

The above procedure saves a backup copy of the current configuration database in the format hostname-version-architecture to the computer accessing the administrative interface. When you click the “Save config” button you get the following box:

The Export Password Secret Seed option is off by default. It should only be used when making a configuration backup that will be stored securely.
What is SQLite database backup format?

FreeNAS use on-disk database file format provided by SQLite to store configuration. In FreeNAS box, it is used to store all the information about your system. So naturally when you backup you get SQLite 3.x database backup file.

Two types of passwords in FreeNAS

  1. User account passwords.
  2. ISCSI CHAP passwords or Active Directory bind credentials.

How to restore FreeNAS configuration

To restore a configuration file, click on the System > General tab > Upload config button. Find the configuration .db or .tar.db file you wish to restore. Now, click on Update button.

The FreeNAS configuration file will be restored, and then the FreeNAS box will be rebooted. For more info see FreeNAS guide here.