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

Backup of config from FreeBSD chroot?

Scheduled Pinned Locked Moved General pfSense Questions
6 Posts 3 Posters 908 Views
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.
  • D
    demonfoo
    last edited by Mar 29, 2017, 6:14 PM

    I had PFsense 2.3.3-1 (actually had just updated from 2.3.3) running on a Soekris net6501, which unceremoniously decided to snuff it. I can no longer boot the Soekris machine, and it's long out of warranty, so it sounds like repair is not going to happen. I can, however, plug the mSATA SSD that was used as the storage for it into one of my Linux machines, and boot FreeBSD in a VM. Is there a way that I can backup the configuration and RRD data and such from there? I've tried booting it directly, but the virtual serial console doesn't work, and I can't reach the running system via network, which means I end up having to kill the emulator. I've ordered a new PFsense appliance from Netgate, so I'd like to just transplant the configuration wholesale. I actually have a backed-up config, but it's from last year, and I'd rather use the latest working config if I can. Thanks!

    1 Reply Last reply Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by Mar 30, 2017, 7:49 PM

      It's far easier to mount the disk to a running FreeBSD install and then grab it that way.

      Linux doesn't read UFS very well or you could mount it directly.

      So if you don't have another system running FreeBSD already, make a FreeBSD VM using 10.3 or 11 and then add your old firewall disk as an additional disk in the VM. Then mount the disk, copy the config out and do whatever you need.

      Remember: Upvote with the πŸ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      1 Reply Last reply Reply Quote 0
      • D
        dotdash
        last edited by Mar 30, 2017, 8:55 PM

        If you could get a box running from a FreeBSD usb boot stick, you could probably mount the msata. Then copy out the xml to a fat32 usb and restore it to the new box.

        1 Reply Last reply Reply Quote 0
        • D
          demonfoo
          last edited by Mar 30, 2017, 10:23 PM

          @jimp:

          It's far easier to mount the disk to a running FreeBSD install and then grab it that way.

          I'm able to boot a FreeBSD VM via qemu and mount the filesystem in there, I can get that far. Unfortunately if I try to chroot into the mounted filesystem, most of the executables are… not happy. I've tried FreeBSD 10.3/i386, FreeBSD 11.0/i386, and FreeBSD 11.0/amd64. I'd thought I could run the shell and do a config backup from there, but that does not appear that it's going to happen.

          Linux doesn't read UFS very well or you could mount it directly.

          Right, I know that Linux doesn't handle UFS well, hence why I wasn't trying to do that.

          So if you don't have another system running FreeBSD already, make a FreeBSD VM using 10.3 or 11 and then add your old firewall disk as an additional disk in the VM. Then mount the disk, copy the config out and do whatever you need.

          Okay, so what files do I need? Looks like the configuration file is (probably) /cf/conf/config.xml? Where do I grab the RRDs from, and how can I import them on the new unit? There's an rrd.tgz file in that same directory, but it appears to be a backup from the last time I did an explicit config backup, so that's probably not super helpful.

          1 Reply Last reply Reply Quote 0
          • J
            jimp Rebel Alliance Developer Netgate
            last edited by Mar 31, 2017, 12:42 PM

            Just /cf/conf/config.xml

            The RRD is a lost cause. The Soekris device could only run 32-bit, and whatever you replace it with should be 64-bit, so you can't just straight-copy the RRD files.

            If you could boot that pfSense install and do a config backup from the GUI you could include the RRD in an architecture-independent way there, to import into a new system. But either way it's not worth the extra headaches.

            Remember: Upvote with the πŸ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • D
              demonfoo
              last edited by Mar 31, 2017, 3:33 PM

              @jimp:

              Just /cf/conf/config.xml

              The RRD is a lost cause. The Soekris device could only run 32-bit, and whatever you replace it with should be 64-bit, so you can't just straight-copy the RRD files.

              Well crud. So much for that.

              If you could boot that pfSense install and do a config backup from the GUI you could include the RRD in an architecture-independent way there, to import into a new system. But either way it's not worth the extra headaches.

              Oh well. I guess that's better than starting from scratch. Thanks for the info, hopefully my PFsense appliance will show up early next week and I can get that going.

              1 Reply Last reply Reply Quote 0
              6 out of 6
              • First post
                6/6
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                This community forum collects and processes your personal information.
                consent.not_received