restore doesnt restore dns records

Chrysalis

Verified User
Joined
Aug 25, 2004
Messages
1,340
Location
uk
Have noticed the reseller restore function doesnt restore nameserver records instead it just adds the defaults on the new server. This is a request for the feature as well as a warning to others.
 
I noticed it myself when moving aprox 70 users from a reseller to another server, had to readd everything manually (I kinda broke a record with the SOA serial number at that time).
But I was under the impression the latest DA version actually backups the .db or something, I'm going to check it out and try to do something about it, as I have a few big moves comming up this week.
(1 reseller has bought a dedicated server so he can be admin, very nice and all, but this does mean I have to move more than 80 users to another server).

I'll check out the backups made by DA reseller level for ya in the latest version...

edit: tested it with a user and the latest DA version, I have a .db dump in /backup/<domain>/<domain>.db. Where the root is the root of the by DA created backup.
Don't know if restore works alright, I hope it does ;).
 
Last edited:
well I used 1.24.3 which is the latest available version, is yours newer?
 
The zone files are backed up and should be in the tar.gz files.

For domain name example.com, look in the example.tar.gz file in /backup/example.com and you should find example.com.db.

They are not restored with the account because the IP address of the server you're restoring to could be different and that could cause problems (ie you'd have to change the DNS by hand in the control panel).

Creating a new zone file solves 95% of the cases.

Regards,
Onno Vrijburg
 
Wait a sec here...

Are you saying when I make a reseller level backup and place it on another server, only the standard zone data will be created ?
That's NOT good at all.
I've got to move about 40 customers with custom zones on friday :(.

I though DA did a 'search and replace' while updating it or something. Can you confirm that doesn't happen ?
 
This is correct, the quickest solution is to copy the zone.db files from the old server and write a script to find and replace the IP.

Regards,
Onno
 
No worship smilie here...
So thank you :).

Very nice to know that, I am however going to ask John if he can add some basic IP parsing to it in later versions. Have bugged John straigth through 3 days already, so one more day couldn't be that worse.
 
Icheb let me know of any progress thanks, I agree this should be automatic, I am no shell script writer.
 
Chrysalis said:
Icheb let me know of any progress thanks, I agree this should be automatic, I am no shell script writer.
Ok, but note that the script will be very ugly and will not have any form of error correction, I need it tomorrow, but my planning for stuff to prepare is a bit 'not well planned' so I'm a bit busy ;).

Most likely I'll just write a console script that asks for old ip, and new ip and place where you placed the backup. Than it will untar the backup find the .db files, parse them to get new ip, make SOA higher and replace the existing .db in the right location :).
(oh, and reload Bind)

edit: I've written a very dirty bash script to do it, however I don't have the time to test it fully. I'm going to postpone the resellers move until I, at least have heard back from John about this.
You can find it in my wiki at http://www.icheb.info/wiki/index.php/Handige_scripts
(yeah, it's in english, at least, the parts that matter).

If you are interested, there are some more DNS issues with DA with custom templates, also written John about it, also have a quick and dirty fix for it available at my wiki (however, that one is in Dutch).
 
Last edited:
great many thanks, yes I am interested in the other script as well, I too have noticed a few problems with DA dns handling.
 
John replied to me about the issues, the restore issue has been noticed and added to todo list (low priority).
The double creation issue is a problem caused by myself, shouldn't have used named.db as custom, but should have used a '/usr/local/directadmin/data/templates/dns_a.conf (and dns_*.conf)' instead.
 
well I have a custom named.db, it works good so no problem with that for me.
 
Chrysalis said:
well I have a custom named.db, it works good so no problem with that for me.
Can you do something for me ?
I'd like to see your custom .db template and a zone file you are using right now. ;)

At the moment I'm adding more stuff to the wiki concerning DNS and DA :). This time a 'swapdns.sh' file that will replace da's config and the zone records' nameservers, I expect it to be added in an hour or so. :)
 
sure.

Can I email you the files, I dont want them on the forum if possible.

Icheb do you know how DA restarts named after changes, I am still having to use a crontab to restart named every 10 minutes so changes are caught since if I leave it named doesnt reload automatically. This happens on every FreeBSD box I upgrade to named 9.x. I am guessing DA uses ndc and thats replaced with rndc in 9.x.
 
Our servers use Bind 9 and we use the following commands.

After add / delete a domain name
# rndc reload

Adter update records in a zone
# rndc restart

I'm sure DA uses something similar.

Thanks in advance.

Regards,
Onno Vrijburg
 
Back
Top