Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Feature request

    General pfSense Questions
    2
    10
    3.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      nsumner
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • S
        sullrich
        last edited by

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

        1 Reply Last reply Reply Quote 0
        • N
          nsumner
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • S
            sullrich
            last edited by

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

            1 Reply Last reply Reply Quote 0
            • N
              nsumner
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • S
                sullrich
                last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • N
                  nsumner
                  last edited by

                  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?

                  1 Reply Last reply Reply Quote 0
                  • S
                    sullrich
                    last edited by

                    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?

                    1 Reply Last reply Reply Quote 0
                    • N
                      nsumner
                      last edited by

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

                      1 Reply Last reply Reply Quote 0
                      • S
                        sullrich
                        last edited by

                        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.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.