pfSense Gold Subscription

Author Topic: How to backup (and restore) DNS (hosts) info?  (Read 1109 times)

0 Members and 1 Guest are viewing this topic.

Offline josemaX

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
How to backup (and restore) DNS (hosts) info?
« on: July 04, 2012, 01:29:57 pm »
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

Offline josemaX

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: How to backup (and restore) DNS (hosts) info?
« Reply #1 on: July 04, 2012, 04:48:43 pm »
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!


Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14976
  • Karma: +4/-0
    • View Profile
Re: How to backup (and restore) DNS (hosts) info?
« Reply #2 on: July 08, 2012, 01:58:18 pm »
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.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline josemaX

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: How to backup (and restore) DNS (hosts) info?
« Reply #3 on: July 08, 2012, 04:01:03 pm »
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,