Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Aug 17, 2010 11:41 am 
Offline
Senior Newbie

Joined: Sun Jun 21, 2009 1:48 pm
Posts: 16
Website: http://www.hardware-revolution.com
WLM: gamecubemanrules@hotmail.com
Location: Montreal, Quebec, Canada
I'm getting ready to transfer my live website from one Linode to another. I've let DNS changes propagate for a while now and lowered the TTL, so when I change the ip in the DNS records, most of the traffic should head to the new server without a problem.

However, just to be sure that everyone goes to the right server, I'd like to setup a redirect from the old server to the new one. Since the domain name won't change though, I'm wondering if there's a way to do that?

I'm looking preferably for something easy to implement on the old server so that it simply sends people to the new one, since I'm not exactly a pro with Linux (I can follow a guide without a problem though.) Once again, the domain name, content and all the urls will be the same, everything is synced, only the server will change.

Any help would be much appreciated, please include as much details as possible.

Thanks a lot,
Mathieu


Top
   
 Post subject:
PostPosted: Tue Aug 17, 2010 4:04 pm 
Offline
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
Are your linodes in the same datacenter? if so, you can just swap IP's.


Top
   
 Post subject:
PostPosted: Tue Aug 17, 2010 4:16 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
My usual approach for an IP change:

1) Drop the TTLs.

2) Add two new DNS records:
www-new.example.com IN A new.ip.address.here
www-old.example.com IN A old.ip.address.here

3) On the old web server, add a ServerAlias www-old.example.com (or your httpd's equivalent).

4) On the new web server, add a ServerAlias www-new.example.com.

5) On the new web server, put a maintenance-in-progress placeholder on example.com and www.example.com. Test using www-new.example.com, if required.

6) When the time comes, replace the old web server's configuration for example.com & www.example.com with a similar placeholder, change the example.com and www.example.com A records to point at the new IP address, then do that voodoo that you do to move everything over to the new web server.

7) As soon as you're ready to "go live" on the new server, zap the placeholder and let traffic fly. On the old server, install a redirect on example.com and www.example.com to www-new.example.com.

8) After a couple days, nuke the old instance and either make www-new.example.com go away, or redirect it to one of example.com or www.example.com depending on your canonicalization policy.

This is a "break-before-make" move; your site will be "down" for some amount of time while you copy files, move the database, and test stuff. There are ways to do this with no downtime, too, but that gets fairly specific and specialized.


Top
   
 Post subject:
PostPosted: Tue Aug 17, 2010 4:54 pm 
Offline
Senior Newbie

Joined: Sun Jun 21, 2009 1:48 pm
Posts: 16
Website: http://www.hardware-revolution.com
WLM: gamecubemanrules@hotmail.com
Location: Montreal, Quebec, Canada
glg,

I've heard of swapping ip before and yes, both Linodes are in the same datacenter, so that would be possible.

However, before choosing that, I'd like to know:

- How long does it take to swap ip?
- Will I need to restart the server?
- Will the new server be live when the ip swap is done or there are any additional steps?
- Are there any drawback(s) to this method?

Don't mind my questions, I just want to be 100% sure that the transition between the two servers goes smoothly.

Thanks!


Top
   
 Post subject:
PostPosted: Tue Aug 17, 2010 5:33 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
In answer to your questions, assuming my memory is correct

- How long does it take to swap ip? - Instant
- Will I need to restart the server? - They both need to be shutdown to swap them
- Will the new server be live when the ip swap is done or there are any additional steps? - Depends on your server configuration if you have a static ip configuration you will need to update this BEFORE you shutdown the server
- Are there any drawback(s) to this method? - None that I can think of


Top
   
 Post subject:
PostPosted: Tue Aug 17, 2010 7:17 pm 
Offline
Senior Newbie

Joined: Sun Jun 21, 2009 1:48 pm
Posts: 16
Website: http://www.hardware-revolution.com
WLM: gamecubemanrules@hotmail.com
Location: Montreal, Quebec, Canada
Quote:
- Will I need to restart the server? - They both need to be shutdown to swap them

Good to know, thanks.

Quote:
- Will the new server be live when the ip swap is done or there are any additional steps? - Depends on your server configuration if you have a static ip configuration you will need to update this BEFORE you shutdown the server

I just have whatever ip was attributed to my linodes when I got them. As far as I know, that's not a static i.p, but correct me if I'm wrong.

Thanks for your help.


Top
   
 Post subject:
PostPosted: Tue Aug 17, 2010 7:28 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Ya linode assigns via dhcp by default so you should be fine, if in doubt, create two test nodes and try it out, it'll only cost you 2 days worth of whatever size linode you have.


Top
   
 Post subject:
PostPosted: Tue Aug 17, 2010 7:38 pm 
Offline
Senior Newbie

Joined: Sun Jun 21, 2009 1:48 pm
Posts: 16
Website: http://www.hardware-revolution.com
WLM: gamecubemanrules@hotmail.com
Location: Montreal, Quebec, Canada
obs,

Wonderful. Thanks a lot for your help, much appreciated.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group