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



  • 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



  • 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!


  • Rebel Alliance Developer Netgate

    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.



  • 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,


Locked