Automatically Restore During Install

From PFSenseDocs
Jump to: navigation, search

If a configuration needs to be restored to a new setup, but it is cumbersome to go through all the trouble of setting up a system and restoring via the WebGUI, there is a much easier way.

pfSense has, as part of the installation routine, a "Pre-Flight Install" or PFI. PFI will check for an existing configuration on a USB drive, and use it instead. When installing to the target disk, it will copy this configuration, and then the first time the WebGUI is visited afterward, all packages will be reinstalled.

  • First, make sure to have a config.xml backup from the old system
  • On a DOS/FAT formatted USB drive, make a directory called "conf"
  • Copy a backup configuration file to the conf directory
  • Rename the backup to config.xml
Example: If the USB drive is E:, the path to the config file would be E:\conf\config.xml
  • Take the USB drive and Plug it into the router
  • Boot the install media (Memstick, disc, etc)
  • Install to the hard drive
  • Reboot the router
  • Remove the USB drive only AFTER the system has begun to reboot.
N.B.: If the USB drive is removed too early, it may still be mounted and the system will panic.
  • Remove the install media as well at this point

It will now boot off the target disk with the restored configuration.

This method is a lot easier than reconfiguring the LAN and restoring via the network, since it can be done without connecting the new system to a network at all.

This article is part of the How-To series.