How to switch server.

erictham

Verified User
Joined
Oct 17, 2004
Messages
26
How to switch sever.

Hi,

I have a server place in NOC1, with 3-4 domains running, each with dedicated ips.

I need to pull out the server from my NOC1 and move to NOC2. What are the best way to move over? Any step by step instructions on how to do this move safely?

Thank You
Eric Tham
 
try help.directadmin.com
there should be a quick tutorial on server to server moves and IP changes etc.
 
jmstacey said:
there should be a quick tutorial on server to server moves and IP changes etc.
There should be, but I just looked through everything manually and did some searches, and didn't find anything.

There may be some information on these forums.

Or if someone may have tried it already... if so, please chime in and let us know what you did.

Thanks.

Jeff
 
I found this on moving all accounts from one server to another:
http://help.directadmin.com/item.php?id=57

However if your moving the server itself, the only different thing would most likely be the IP addresses.
I searched the forums and finally found the link (I could never rember the right extension, I'll add it to my bookmarks)
http://directadmin.com/change_ip.txt
It should be pretty easy. Just download ipswap and run the command with your current/old ip with the new equivalent(sp) to be used.

Don't forget to get your license updated too!
 
Another question is Name servers.

Right now i have ns1.abc.com and ns2.abc.com being pointed to 1.2.3.4.5 and 2.3.4.5.6

When i pull out my server and move myself to the new server, what should i change in my domain registar for the two name servers?
 
eric I did this recently without too much of a problem. I suggest of course not completely leaving NOC1 before you have everything running and moved to NOC2. This way the nameserver issue is much easier to handle. As for moving stuff here is what I basically did.

-Setup new server at NOC2 and install DA whether you rent a license for this one for a month or two or buy it outright is up to you.

- create same resellers on DA2 as DA1
-- allocate IP addresses as you see fit. ( I took this time to consolidate numerous sites that had there own IP address but didn't need it)

- reduce ttl on nameservers to 60 seconds or thereabouts

- FOR DNS STUFF - I did this. I changed the IPaddress of NS2 from what it currently was to my new DA server. which at this point had no information to give out thus inquiries should go to NS1 which is still pointing to the old webserver and functioning properly.

- Make sure you have any and all extraneous software duplicated. ie. imageMagick, Pear, darwin, whatever

- shutdown mail and web access to DA1

- use each reseller to backup all user information.

- then scp those backups to DA2

- use each reseller on DA2 to restore the backups of all users. (this is where you allocate IP addresses)

- Now DA2 should contain all users, sites, email and DNS. So if you now take down DNS on NS1 this server will take over DNS and will now point to itself for services if you do what I described above with nameservers.
-- MAKE SURE at this point to go through your DNS and compare it with the old nameserver and make any customizations. For instance i had lots of people that did their own DNS and I needed to change mail.domain.com to point to their server not mine.

A few notes on the backup/restore thing.

-- it doesn't get all files you need.
(things I remember having to copy manually)
- awstats
- installatron
- any databases that weren't created through DirectAdmin

I'm sure there are plenty of things that I am forgetting. But it is important to outline your steps like this before you begin actually starting it.
 
Actually i am pulling out that server from NOC1 and placed it at NOC2. I only have one server, so the way you suggested is much more 2 servers are required.

Thanks anyway
 
I would suggest doing the following:

  • Change the TTL on your DNS to 10 min (600 sec) at least a couple of days before you want to move.
  • Connect your server and a laptop to a seperate Hub/Switch
  • Change your IP's while still in NOC1
  • Test your sites using a laptop using the new IPs
  • If you can reach the sites move the server to NOC2
  • By the time you get to NOC2 the DNS should be pointing to the new IPs and everything should work.

Regards,
Onno Vrijburg
 
Last edited:
Hi,

Sorry but i am a bit slow on this:

Right now my server in NOC1 has ip 1, 2, 3, 4

With my domain registar, i created the name servers to

ns1.domain.com to ip1
ns2.domain.com to ip2

Now, when i pull out my server from noc1 to noc2, i have to change again on my domain registar and make ns1.domain.com to my new ipA and ns2.domain.com to new ipB

So i was wondering , does the guide at http://directadmin.com/change_ip.txt change the server to understand that the two domain is changed too ?

One more new question: How do i change the TTL on my DNS, any step by step guide on how and where to do this? (I understand that by doing this will cause the new name servers to resloved faster right?)
 
erictham said:
With my domain registar, i created the name servers to

ns1.domain.com to ip1
ns2.domain.com to ip2

Now, when i pull out my server from noc1 to noc2, i have to change again on my domain registar and make ns1.domain.com to my new ipA and ns2.domain.com to new ipB
Yes.
So i was wondering , does the guide at http://directadmin.com/change_ip.txt change the server to understand that the two domain is changed too ?
Do you mean the two nameservers? If so, I'd guess not but you can check, and change it manually if it's not done automatically.
One more new question: How do i change the TTL on my DNS, any step by step guide on how and where to do this? (I understand that by doing this will cause the new name servers to resloved faster right?
To just change it temporarily edit all the files in /var/named to show 600 after the $TTL on the top line, instead of what it shows now, and also to change the second column of each line (the one between the name and the "IN" from whatever number it is now to 600.

Also change the last number in the soa record (the one with the close paren ")" after it) to 600.

Then update the serial number (it's the number on the second line of the soa record; it probably begins with 2005) by adding 1 mathematically (not by appending but by adding).

When that's finished for all domains, restart BIND.

To do it autmatically, this thread might help.

Jeff
 
Well, change it manually? How do i do that? Currently in NOC1 , the server settings is

ns1.domain.com to ip1
ns2.domain.com to ip2

Besides changing the registar side ns1 and ns2 to point to the newIp1 and newIp2, what else do i need to change in the server to make sure the server understand newIp1 and newIp2 is the new name server ip for the server?


jlasman said:


Do you mean the two nameservers? If so, I'd guess not but you can check, and change it manually if it's not done automatically.

Jeff
 
Copy the template to the custom directory:

# cd /usr/local/directadmin/data/templates
# cp -p named.db custom

change to the custom directory

# cd custom

Then edit the custom template with your editor of choice. When you're done, delete the backup file if any.

Then run this command to rewrite all the DNS on the server:

# echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue

That will change all the existing DNS.

Each reseller account has a place to set up the nameservers for new users.

Jeff
 
Back
Top