One issue which has interested me for a while is moving databases from one server to another. My traditional approach involves taking down the website, dumping the database, copying the dump file, loading it up, and then changing the DNS to point to the new server.

With the goal of minimizing downtime, I’ve been considering this approach:

dump the database

scp the dump to the new server

turn off updates on the old server

dump again

rsync to the new server

load the dump onto the new server

change the DNS

The goal is to reduce the time between turning off updates and changing the DNS. I have previous timings for dump and scp times. Let’s now look at rsync times. We will also trying dumping without compression.