How to restore DNS Management settings from full backup file

Shafaghi

New member
Joined
Apr 12, 2024
Messages
6
hi...
I have scheduled a full backup in the automatic backup settings.
Now I need to reset the (DNS Management) settings and Sub-Domains, but this option is not available in the backup restore settings!
Is there a way to restore (DNS Management) settings and Sub-Domains from an existing backup file?
 
Is there a way to restore (DNS Management) settings and Sub-Domains from an existing backup file?
I don't really understand your question. Exactly what kind of full backup? Admin backup, reseller backup or user backup?
So automatic backup setting from who of these 3?

Normally with Admin or reseller backup, all DNS information is also in the backup of the user, so on restoration all DNS settings and sub-domains are always restored. No need to do extra things.
 
hi...

Thanks @Richard G

I mean Admin backup.
I understand what you mean, but when restoring the backup, the sub-domains and DNS-Configuration settings related to the (USER) are not replaced and have no settings.
I should also mention that I have reinstalled the (named service) and then this problem occurred and now I have to restore the backup.
thanks
 

@Richard G

I need to say that I am not going to full restore the entire backup and I only want to restore the settings related to (named service) and the rest of the parts, especially the emails, will remain.
 
and I only want to restore the settings related to (named service) and the rest of the parts,
There is a script which can set all DNS values for all domains to default. But as said that is for all users/domains on the server.

If you want to only restore DNS settings for several domains, then like @floyd said that would be a manual process.
 
but when restoring the backup, the sub-domains and DNS-Configuration settings related to the (USER) are not replaced and have no settings.
Then something else has gone wrong somewhere. Reinstalling te named servers is also something which isn't normally done as DA takes care of the named installation too.
 
Thank you all

Richard G

floyd

My general problems are:
I first updated the server using the commands below

Code:
cd /usr/local/directadmin/custombuild
./build update

./build all
./build update_versions
./build rewrite_confs

After that, (named) service stopped working completely!
I installed and started (named) service again But after installing and restarting the service, all existing sub-domains were lost!
I am now going to restore those sub-domains using the existing full backup file.
Is it possible to extract the information of the previous sub-domains from the existing full backup files?
Because unfortunately I don't remember the previous sub-domains and IPs and I have to find them along with the IPs of each from the existing backup.
 
After that, (named) service stopped working completely!
I installed and started (named) service again
Well there you have gone wrong. You don't need to do a update_versions and rewrite_confs anymore if you do a build all, because everything is rebuild then.

If named stopped working after that, you should have only investigated as to why named stopped and fix that issue, not by installing it again.
You may have made things worse than they were.

Why isn't it possible to just remove everything which you have a backup from and then restore everything from the full backup? This should give everything back including subdomains.

If you need to do it manually, you have to extract things from the existing backup files.

All domains and sub-domains should be in there. But it's a hell of a lot of work to re-create the named.conf file if you have a lot of those.
I don't know what went wrong, but normally on installing named again, one does not loose all existing /var/named/domain.db files.

Maybe somebody with a lot of knowledge knows some good trick. @zEitEr any clue on this and how these files could be lost?
 
I suspect that there is a problem with the server's network connection while updating and receiving new versions while executing the commands, and the packages are not installed correctly, and that is why the service is down.
Unfortunately, I did not know how to restart the (named service), and when starting the service in the Direct Admin panel, I encountered the following error and service not start!
1713108688885.png

It is not possible to use all available full backup file because some of them are old versions, on the other hand, we need all available emails.
In fact, there is a need to mix the backup file data copy and all available emails!!!
The best way is to be able to extract only the names of existing sub-domains and IPs from that backup file.
Is there a script or way to do this?
 
Hmmz... very odd issue.
Always best is in case of issues, looking at logfiles via SSH and not use the GUI.

Is there a script or way to do this?
Unfortunately not as far as I know.

However I encountered a kind like issue where I had to extract dns information.
I used Midnight Commander to open the backups and then easily copy the required content to a custom directory.
After that I created a script to adjust some dns info (in my case add ipv6 in spf) and after that entered the db files in /var/named and added the required information into the /etc/named.conf file.
After that I used the DNS update command do get everything updated and working again.

You can easily install Midnight Commander via the yum install mc command, or with apt if you are on Debian or derivate.

Be aware that if you're working as root via SSH to fix this, that there is no room for error. There is no trashcan or undelete.
 
Back
Top