Set both servers up and test to make sure they
On the new server (one you are switching to)
proxy all requests back to the old server Apache
ProxyPass / http://oldip:80/
ProxyPassReverse / http://oldip:80/
Switch the DNS to point at the new server.
Wait for 24-48 hours, Making sure all traffic
is now being routed though the new server, back to
the old server.
remove proxy settings.
do a backup of the databases
send them to the new server
restore the database backups
You can write a script to do that.
To speed up the database backups you could use
the binlog so you only need to transfer the more
When your happy the new server is working. stop
the old server running.
Should work with a small amount of
Alternately, Reduce your TTL on the DNS (NOTE:
Not all DNS caching respects this if its small)
wait for that change to process
Switch to the new server, with a higher TTL, Due
to the old TTL being really small, most people
will not be effected.
Alternativly, make the current site read only
until the switch has occurred.