
13th January 2008, 16:23
|
|
Member
|
|
Join Date: Oct 2007
Posts: 32
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Moving websites without downtime (apache2)
Hi
Im in the early process of planning a copy of old websites onto a new server location. Has anyone here done so, without downtime? What would be the best way to accomplish a data transfer, and rerouting web traffic?
Thanks in advance.
|

14th January 2008, 17:00
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
Are these static or dynamic web sites? If they are just static HTML files, you can simply copy them over. If they are dynamic and use a MySQL database, you should make sure that the web sites on the old server already use the database on the new server, i.e., both web sites (on the old and the new server) should use the new database to prevent inconsitent data.
You can then change the DNS records, maybe wait 14 days to make sure the DNS changes have fully propagated, and switch off the old server.
|

14th January 2008, 17:32
|
|
Member
|
|
Join Date: Oct 2007
Posts: 32
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Hi, and thankyou for your reply.
These pages are not static, but php webpages that use a single mysql database. I agree on the database move, but the webpages are constantly changing. We host these pages, so im a bit worried that the move will result in some kind of downtime or that a customer changes something on their website, and this change is not copied to the new server.
What would you suggest here? Perhaps a cronjob, with Rsync that copies over differential files if found, and with a newer date?
|

15th January 2008, 18:30
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
Quote:
|
Originally Posted by raypettersen
What would you suggest here? Perhaps a cronjob, with Rsync that copies over differential files if found, and with a newer date?
|
Yes, something like this: http://www.howtoforge.com/mirroring_with_rsync
|

16th January 2008, 09:55
|
|
Member
|
|
Join Date: Oct 2007
Posts: 32
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Thankyou for your reply falco.
I have one finale question im hoping you could provide an answer to. How do I make apache on the old server, relay a site to the new server adress? I would like apache to redirect our customers one by one to the new server, when we have everything up and running.
This would enable us to do the dns changes without interruption. A friend of mine mentioned something like "mod proxy" (not sure if i remembered it correctly). Is that the way to go?
|

17th January 2008, 16:08
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
Quote:
|
Originally Posted by raypettersen
This would enable us to do the dns changes without interruption. A friend of mine mentioned something like "mod proxy" (not sure if i remembered it correctly). Is that the way to go?
|
That should work, but I think I'd try smoe mod_rewrite rules instead: http://httpd.apache.org/docs/2.2/misc/rewriteguide.html
|

20th January 2008, 23:19
|
|
Member
|
|
Join Date: Oct 2007
Posts: 32
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
These rules are written in .htaccess files?
How would I redirect one website to another server using IP instead of a web adress? Most of the examples use explicite webadress redirects.
|

21st January 2008, 19:00
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
[QUOTE=raypettersen]These rules are written in .htaccess files?OTE]Yes, or directly in the vhost configuration.
Quote:
|
Originally Posted by raypettersen
How would I redirect one website to another server using IP instead of a web adress? Most of the examples use explicite webadress redirects.
|
Replace the hostnames with the IP address. Please note that this only works for IP-based hosting, not name-based hosting.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 20:45.
|
Recent comments
18 hours 22 min ago
23 hours 20 min ago
1 day 47 min ago
1 day 1 hour ago
1 day 3 hours ago
1 day 7 hours ago
1 day 8 hours ago
1 day 10 hours ago
1 day 23 hours ago
2 days 1 hour ago