Feature request



  • As I mentioned elsewhere my PfSense machine got borked. In rough summary in the middle of a restart my daughter decided to hit the power button on the machine. She choose a perfect time while it was in the middle of reading the XML file.

    For whatever reason the XML config file got corrupted. Hence everytime after that when I tried booting it complained no configuration file could be found. Hence I needed to reinstall. While I was at it instead of loading an old config file I reconfigured everything from scratch (who knows what has changed in the past 6 months so that a new config file may be worth it).

    It seems to me however it should be easy to allow there to be a backup config file which a user can every once in a whie update. So for example now that I am up and running stable again I would save the backup config file. If loading I borked the main file again, or I made some stupid change that killed everything I could on boot choose to load that backup file.



  • Diagnostics, Backup/Restore -> Backup is your friend.



  • Yes I know that, the point is that the machine wouldn't even boot. I have a nice backup (though I decided not to use it in this case). If the machine had booted I could have within 30 seconds done a restore, but because the XML was completely shot it complained it had no XML file and to please go fly a kite.



  • If there is no configuration, there is no point in booting up.



  • That is what I am trying to sugges a solution for. An "online" backup config file that can be used to boot if the first is borked. Basically the same idea as a MB with 2 bios chips. Only it seems to me here it will probably actually work and won't cost anything.



  • It already does this.  If no backup can be found revereted back to it halts.

    Embedded systems do not have this behavior but full installations do.



  • In that case any idea why my system couldn't find a backup to revert to? How can I put a backu in place for it to revert back to?



  • Boot the system to single user mode (option 4 at the freebsd boot loader menu).

    Navigate to /cf/conf/backup and do a ls.

    Are there files present?



  • Currently there sure are. 53 of them to be exact while 53 xml files and 1 backup.conf or something like that.



  • Looks like I missed a halt statement.  I just added the code.

    In the meantime, do this.

    Boot to single user.

    run /etc/rc.conf_mount_rw

    cd /cf/conf/backup

    Find the most recent file then issue:

    mv $mostrecentfile /cf/conf/config.xml

    run /etc/rc.conf_mount_ro && shutdown -r now

    Replace $mostrecentfile with the filename that you found.

    This will get you back up and running.


Locked