Backing up our pfSense system is an important part of minimizing downtime and maintenance time. In this recipe, we will demonstrate how to back up pfSense.
- Navigate to Diagnostics | Backup & Restore.
- Click on the Backup & Restore tab:
- Leave the Backup area drop-down menu set to All.
- Leave the Skip packages checkbox unchecked.
- Leave Skip RRD data checked.
- Check the Encryption checkbox.
- Enter a password in the Password text field.
- Click on the Download configuration as XML button and save the configuration file to a secure location.
The Backup & Restore
configuration section allows us to save the system settings as an XML file. With this XML file, we can restore pfSense to these settings in two different ways:
- After a hardware or software failure, we can reinstall pfSense, and then restore the previous configuration using the previously-saved back up XML file.
- In the absence of a hardware or software failure; say, we just want to rollback pfSense to a previous restore point, then we can use the previously-saved back up file to do so.
In the recipe, we backed up all configuration areas, but we can select only a subset of the configuration using the Backup area drop-down menu. This is useful if we only need to backup a specific portion of the configuration. Note that we can select All and still exclude package and Round Robin Database (RRD) data. While it is generally good practice to save package information, you probably do not need to save RRD data; although it might prove useful later as a diagnostic tool, it can consume four megabytes or more of config.xml
space.
If you need to review the recent config changes, click on the Config History tab. This tab provides functionality similar to the Restore recent configuration command available from the console/SSH. In addition to viewing all recent config changes, you can perform the following operations:
- View the difference between two configurations by selecting the older configuration in the right column of radio buttons, selecting the newer configuration in the left column, and clicking on the Diff button:
- The XML file contents will appear at the top of the page, showing what has been added (text with a green background), what has been removed (text with a red background), and what is unchanged (body text with a gray or white background; unchanged headers take gray backgrounds). An example of this is shown in the following screenshot:
- pfSense Backup and Restore documentation: https://www.netgate.com/docs/pfsense/backup/configuration-backup-and-restore.html