Results 1 to 7 of 7

Thread: Option: "Restore with Local NameServers", does it work?

  1. #1
    Join Date
    Aug 2005
    Posts
    263

    Question [SOLVED] "Restore with Local NameServers", does it work?

    The option "Restore with Local NameServers" either doesn't work, or it does something different from what I assume it would do.

    I thought that if this option is enabled, it would replace the names of the NS records in the backup, with the names of the NS records from the server on which I am restoring the account.

    I made a backup of an account on a server that uses name servers ns1.pjdn003.nl and ns2.pjdn003.nl.
    I restored this account on another server that uses ns1.pjdn004.nl and ns2.pjdn004.nl.

    I enabled the option "Restore with Local NameServers" on the target server before restoring.
    But after the restore, the DNS records for the restored account still have ns1.pjdn003.nl and ns2.pjdn003.nl.

    Do I misunderstand what the option does?

    PS1. I have NS1 and NS2 setup correctly in "Administrator Settings" on both servers.
    PS2. I tried both "Admin Backup/Transfer" from Admin Level as well as "Manage User Backups" from Reseller Level, both with the same result.
    Last edited by Aspegic; 08-09-2017 at 01:11 PM. Reason: Problem solved

  2. #2
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    3,026
    I thought that if this option is enabled, it would replace the names of the NS records in the backup, with the names of the NS records from the server on which I am restoring the account.
    That is correct and it was/is working that way.
    I also had some time that it left ns1 in place and added the new ns1 and ns2.

    Beware that the option is not enabled by default and you have to enable it (and click save) -before- you do any restore.
    If you restore afterwards, it should work like you think it does.
    I must say I also create the domain before restoring (in your case pjdn004.nl) and add the nameservers in there too, this might not be necessary.

    PS1. I have NS1 and NS2 setup correctly in "Administrator Settings" on both servers.
    Is that the only place?
    Try to also enable it in your admin account on Reseller level -> Extra features -> Nameservers and create them there.
    It has to say below there "Set the Nameservers that will be assigned to new users" to your pjdn004.nl nameservers, otherwise it probably won't work either.
    Greetings, Richard.

  3. #3
    Join Date
    Aug 2005
    Posts
    263
    Hi Richard, thanks for replying.

    Yes, the nameservers are setup correctly under Reseller Level > Nameservers.
    It just doesn't work. I tried another account just now, same result.

    The problem is, I need to transfer 165 accounts and it is a tedious job to have to manually correct the NS records for every account after each restore.
    I could just restore them all, then download *.db from /var/named, then do a Search&Replace over all these files and then upload them back. But this shouldn't be necessary.

    Anyway, maybe an admin will read this and look into it.

    Thanks again!

  4. #4
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    3,026
    I'm am an admin.
    You might however send in a ticket:
    https://tickets.directadmin.com/

    I presume you did, but just to be sure, when selecting the backup to restore, did you also select the "Use the IP from the list:" and select the correct ip address in the restore manager?

    Attached a picture.
    restore.jpg
    Last edited by Richard G; 08-09-2017 at 07:15 AM.
    Greetings, Richard.

  5. #5
    Join Date
    Aug 2005
    Posts
    263
    With "admin" I was referring to someone from JBMC Software. I'm an admin myself too

    But I did manage to solve the problem. I also think I know the origin of the problem...

    When I first installed the new server pjdn004, during setup of directadmin, I enter mail.pjdn003.nl as the hostname.
    I realised my mistake when setup was well underway, but I thought I would change it later after setup had completed.
    So, after directadmin was setup and working correctly, I went into Administrator Settings and changed the server's hostname to mail.pjdn004.nl. All was well, or so I thought.

    After setting up the nameservers to ns1 and ns2.pjdn004.nl (both in the admin and reseller section), I started backing up accounts on the old pjdn003 server en restoring them on the new pjdn004 server. And that was when I discovered the problem as originally described.

    It appears as if the names of the name servers as you see them in the directadmin user-interface are not the values used for replacing the nameserver names during restore (if you enable that option). But that's what you would expect, right?
    Instead, it looks as if directadmin uses named.conf and the corresponding db file in /var/named
    In those files, the hostname was still listed as pjdn003, even after I had changed the hostname to pjdn004 in Administrator Settings. But I only discovered that today. Only after manually modifying named.conf and renaming mail.pjdn003.nl.db into mail.pjdn004.nl.db and replacing pjdn003 into pjdn004 inside the pjdn004 db file did it start to work as it should.

    Now when I restore accounts on the pjdn004 server, their nameservers are set correctly to ns1 and ns2.pjdn004.nl.

    I suspect that directadmin works as designed with this feature. It's just that when using the user-interface, one assumes certain things that turn out not to be true. I think that part could be handled better.

    Anyway, I'm happy it is working

    Thanks Richard for trying to help. Much appreciated!
    Last edited by Aspegic; 08-09-2017 at 05:24 PM.

  6. #6
    Join Date
    Aug 2005
    Posts
    263
    And just now I discovered a second situation in which case the nameservers in the backup are not overruled by the nameservers of the target server:

    If the account your are trying to restore already exists on the target server (so you are restoring a backup, overwriting an existing account) then the nameservers of the target server are not used.

  7. #7
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    3,026
    With "admin" I was referring to someone from JBMC Software. I'm an admin myself too
    I knew you ment that and that you are too, otherwise you would not have admin rights on your server. I just made some fun, that's why the smilie was placed.

    I think that part could be handled better.
    I agree with that! Glad you figured out the cause, this could have taken some searching.

    If the account your are trying to restore already exists on the target server (so you are restoring a backup, overwriting an existing account) then the nameservers of the target server are not used.
    That could indeed be the case. I don't know if that is a bug or not. I normally do never overwrite exising accounts, or otherwise I delete them and restore them again.
    However, I always create the admin account and have seen a couple of times when overwriting the admin account, the old nameservers were saved and from the target nameserver only one was added (instead of replaced).

    So this might be some bug, maybe SMtalk or DA staff can comment on that. I'm curious if others experienced this too.
    Greetings, Richard.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •