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

    How to backup (and restore) DNS (hosts) info?

    Scheduled Pinned Locked Moved DHCP and DNS
    4 Posts 2 Posters 1.9k 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.
    • J
      josemaX
      last edited by

      Hello all,

      I'm upgrading my pfSense box to new hardware, and trying to restore as much configuration as i can from the initial one.

      I'm having a problem when restoring the DNS Forwarder info. I have many host names defined here, and i don't want to enter everyone (they are really a lot of them).

      As the backup/restore option don't restore this, i went to copy /var/etc/hosts from the older box to the new one, but when i reboot, the file is restored with the empty version of the new box.

      Can anyone help with a way to backup/restore this? (yes, i've STFW)

      Thanks

      1 Reply Last reply Reply Quote 0
      • J
        josemaX
        last edited by

        I got it.

        The full backup didn't work, but now i tried to backup only the DNS Forwarder section, and when restoring it, it worked!

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          All of that should be inside of the config.xml file. Restoring a full backup including that (and restoring all sections) should have worked, but if you select a specific section to restore, and feed it a full file instead of just a file with that one section, it would not work on 2.0.x or before. We fixed that up on 2.1.

          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
          • J
            josemaX
            last edited by

            Hello

            Thanks by your answer. That is what it happened. First I tried using the full backup and restoring only DNS. Didn't want to restore the full backup because i want to create new config for some sections.

            Best,

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