0

I am moving an e-commerce site to a new server. All has been successful and its time to change the DNS for the domain.

It's a relatively popular site and I fear that during propagation orders will be split between the old database and the new one. The databases do contain content that is dependent of the server it is on (Cache path, upload directory, etc.) so I can't just point the old site to the new database.

Are there any solutions to this without any of the sites going down.

Thanks in advance

KThompson
  • 119
  • 1
  • 5

2 Answers2

0

Without doing database replication between the two sites, the best you can do is:

a) check your logs for your low periods of activity and set this as your maintenance period window.

b) send out/post on your site an advanced warning that you're making some changes (and I'd mention that the new server is faster, etc. so there's a positive effect for the downtime).

c) set your DNS TTL to 1 hour for several days to a week (depending on what your TTL was before you change it) or so ahead of your maintenance window; a week is safe.

d) change your old site's home page to "We've moved, etc." and having created a new.yourdomain.com A record that points to the new server, put a link to it on the "we've moved" page for those users who happen to hit the site during your maintenance period and/or if they're DNS was/is cached; make sure your site's database/code (cookies and session etc. can cope with multiple domains, it should though).

e) change your DNS A records to the new site; over the next few days change your TTL back to something more reasonable (3-6 hours is fine, although some say 24 hours is "standard").

You could also look at transparently redirecting requests (port forwarding, etc.) received by the old server to the new server, but I'm not sure how much control you have over your old hosted environment.

gravyface
  • 13,957
  • 19
  • 68
  • 100
0

You have a few choices. One would be to point the old site at the new database, if possible. Another is to move it, and just pick up the orders on the old site for a day or two (if there are any — if your TTL’s low, there’ll probably not be too many if any at all).

The third way, though, is that you add a new record, temporarily, for www2.yourdomain.com, pointing to the new server. Set up the new server to listen to both www. and www2. (not redirecting between them!), and the old one to redirect to www2.yourdomain.com. After a few days, once you’re confident that DNS is up to date everywhere, adjust www2 to permanently redirect to www.yourdomain.com. I’d serve up a robots.txt on www2 to keep it under the radar as far as search engines are concerned if it’s reasonably high-traffic.

Mo.
  • 2,236
  • 17
  • 9