2 servers + nameserver -- sync all domains + DirectSlave

BBM

Verified User
Joined
Jun 8, 2013
Messages
416
Location
Dutch Mountains
I have 3 VPS servers at the moment, but I'm struggling with the nameserver-operation and syncing of domains across these 3 servers.
This is currently what I have running:
- (old) CentOs 6 VPS; This is 'server-A' with all domains. (ns1.server.net)
- NameServer (ns2.server.net)
- Fresh CentOS7 VPS (Server B) where (slowly) all the domains will be moved too eventually. (ns0.server.net)

I have backed up and restored a number of small domains already to the new VPS. After a domain-restore I remove the domain and records on server A so it will be picked on server B.

How would you go about linking Server A and B and the nameserver (running DirectSlave) together so all domainrecords are synced properly?
(Eventually Server A will be removed).
 
I agree with Active8's thought. You can even now use the script to convert from your Centos 7 to Almalinux 8 before you're fully over maybe.

As for your question. I'm not sure. It depends on how long it will take to move from server A to B.
Mostly we use another domain and hostname on the new server. The setup new nameservers there.
At a nightly time we move all accounts, then change the nameservers at their registrar and ready.
But that is not always possible for everybody.

In your situation I don't know if that will work. You can't use the NameServer (ns2) for both server at the same time if I'm correct. Because if you move a domain from server A to B, probably somewhere something will tell that the domain already exists. On restoring the domain on server B, then ns2 might complaint that the domain already exists (because it still has server A info until the ns records are removed there).

Probably somebody has a better idea to do this. As said, we don't keep the same names normally.
 
I think I'm already running into timing issues when a domain has moved to the new server indeed.
Sometimes it works, other times the domain can't be found. Probably because which of the nameservers is polled fro the domain I guess.
This lets me believe I having syncing issues between the nameservers on the 3 VPS-servers.
I enabled Multi Server on both 'DA'-servers, thinking that should be have been enough, but I'm not sure now.
I thought moving to a new server would be fairly easy, but I've noticed I'm still lacking the proper knowledge to make the transition go smoothly.

As for why CentOS 7, this was because it came pre-installed with one of the OS+DA installs choices at TransIP at the time.
DA is linked to the OS/VPS, so I can't easily change that anymore.
I would gladly go with a stable OS like AlmaLinux for instance, but I would like to get rid of my CentOS 6 server first.
 
I enabled Multi Server on both 'DA'-servers, thinking that should be have been enough, but I'm not sure now.
Normally it should be, but the problem is that you can't move domains from A to B with multiserver enabled on these servers. This will generate the error that the domain already exists on that server. And maybe other errors/issues.

To fix that, one should first disable multi server on both servers to prevent errors.
Then transfer the domain from server A to server B.
When that is done, remove the domain from server A, this will also remove the DNS records.

After that, enable multi server again, and start the rewrite command only on server B, so the transferred domain's DNS records are put on server A but the domain isn't locally an A anymore so no errors anymore either and only used as secondary (or 3rd) nameserver.

But this can take up a lot of work, that's why we try to completely move all accounts at once.

thought moving to a new server would be fairly easy, but I've noticed I'm still lacking the proper knowledge to make the transition go smoothly.
Moving itself is fairly easy, at least if you can do all at once. Disable multiserver setup on A and B and go.
It's starts getting more difficult when you have to move in parts.

DA is linked to the OS/VPS, so I can't easily change that anymore.
Als Transip support about that. Because normally on a license you can easily change the license OS. And for Alma Linux you can keep it at Centos 8.
However, you have to upgrade to Centos 8 first.
Then change license and probably do a ./build all dor something like that. I'm sure somebody here can tell you who already has done this.
However... june 2024 is again 3 years, maybe you already choose another server or VPS at that time.
 
Thanks.
Reason for doing it in parts was I'm not confident yet the new VPS (and more the nameserver-part of it) is running perfectly already. So I decided to move a few small irrelevant domains first to see how things went, before I start moving larger/higher traffic domains where down-time is not welcomed.
 
Because normally on a license you can easily change the license OS
True , I have asked this to Transip earlier
I'm sure somebody here can tell you who already has done this.
I assume that no one on this form still has tested the inplace upgrade from Centos 7 to Almalinux 8.5 so I am afraid that I am that test person
In a few days I will test that project and let my fellow forum member known the outcome, fingers crossed :)
 
so I am afraid that I am that test person
Ah oke, then probably you can best first (a.s.a.p.) use the Github script to first update from Centos 7 to 8. It's less risk with a minimum of accounts on it, so that's why it's important to do this first.
After conversion check and take care that you can use the correct kernel before rebooting. So it will boot in Centos 8.
After that, do a yum update so Centos 8 is fully up to date.
Then change license to Centos 8 and after that do an update license and ./build all d so all is working fine on Centos 8. And if possible custombuild update.
At least that is how I would do it, to be sure all is running without issues and no licensing errors are given.

When this all works good, then use the conversion script to convert from Centos 8.5 to Alma 8.5. No need to change license OS anymore.
Just after the conversion, check first that you will boot into the Alma kernel when rebooting.
This last part has already be done by several people here including, me so that should give no problems normally.

Good luck! (y)
 
This last part has already be done by several people here including, me so that should give no problems normally.
Yes I know , we were one of the first early adopters who has used this converse script to AL 8 :)
then probably you can best first (a.s.a.p.) use the Github script to first update from Centos 7 to 8. It's less risk with a minimum of accounts on it, so that's why it's important to do this first.
We are going to test more "fast" way because inplace script supports conversion from Centos 7 to AL 8 and the provider of the script it is AL self.
I assume that they know their script and a direct conversion is surely supported and tested (hope so)
Then change license to Centos 8 and after that do an update license and ./build all d so all is working fine
Yes smtalk already mentioned that , I am certain that this is mandatory last step

I am going to test test this asap and share the results here...
 
We are going to test more "fast" way because inplace script supports conversion from Centos 7 to AL 8 and the provider of the script it is AL self.
Ah great, I didn't know they were already that far.

Yes indeed you were one for the first doing the conversion to AL8.... sorry. :)

I'm very curious to the results, so I will put my thumbs up for you and hope you won't encounter issues. (y)(y)
 
I have 3 VPS servers at the moment, but I'm struggling with the nameserver-operation and syncing of domains across these 3 servers.
This is currently what I have running:
- (old) CentOs 6 VPS; This is 'server-A' with all domains. (ns1.server.net)
- NameServer (ns2.server.net)
- Fresh CentOS7 VPS (Server B) where (slowly) all the domains will be moved too eventually. (ns0.server.net)

I have backed up and restored a number of small domains already to the new VPS. After a domain-restore I remove the domain and records on server A so it will be picked on server B.

How would you go about linking Server A and B and the nameserver (running DirectSlave) together so all domainrecords are synced properly?
(Eventually Server A will be removed).

This is what we did just over a month ago, except we went from CentOS6 to AlmaLinux.
I did the same as you by moving a couple of small domains to the new server first to make sure I had the process worked out.

Follow this guide and you should be good:
https://docs.directadmin.com/directadmin/backup-restore-migration/migrations.html

Make sure to read the section Backup/Transferring Users between linked Multi-Server Setup boxes

For the syncing of domain records I used Multi Server Setup.
On the old server I had it setup as:
New Server - Zone Transfer and Domain Check enabled
Directslave - Zone Transfer and Domain Check enabled

On the new server I had it setup as:
Old Server - Zone Transfer and Domain Check enabled
Directslave - Zone Transfer and Domain Check enabled

The above should mean that the zones are transferred between all 3 and making a change to a record on one server will push to the other two.
The Domain Check just means that you can't add a domain to the server if it already exists on the other server. This only applies if you are adding a new user, or restoring a user, and the domain you need to assign to them already exists on your other server.

When transferring domains you don't need to disable multi-server.
On the new server you just need to turn off the domain check option in multi-server settings.
Then when you restore the user to the new server you shouldn't get any errors.
 
On the new server you just need to turn off the domain check option in multi-server settings.
Correct but I disabled the complete thing, to prevent that some cron or bind restart would overwrite the new settings again, so just to be sure. You probably have to turn of the user check too if you have that on. Because in the past that also gave me an error.
 
Back
Top