My Life Stream
Awesome...Google Maps street view in Ventura CA. Now, I'm off to find our cars. 17 hrs ago

How I migrate servers in 20 minutes

This somewhat requires you’ve followed my suggestions on not committing yourself to a certain host or your own DNS or mail servers, if not the extra steps might take you 10 more minutes, maybe days.

There are plenty of ways to migrate to a new server depending on how you’ve setup the server or your host, these are just to show the simplicity of my migrations after following the post linked above.

Step 1:

Rsync your other server’s files to the new one.

SSH into your new box and run rsync to connect to the old machine through ssh. It’s going to pull over every file to the new host that you specify.

rsync -avz -e ssh root@[OLD MACHINE IP]:/home /

example

rsync -avz -e ssh root@64.13.227.XX:/home /

This is probably the most important time saver, it will help dramatically in a planned migration since you can run this multiple times after the initial sync. The purpose of rsync is that it will only pull over changed files since the initial rsync.

Step 2.

Run a mysqldump your DB and either use scp to grab the file from your old host or use wget after placing the dump in an accessible place on your webserver. Then just import it after receiving it on the new host.

Step 3.

For people running their own server you’ll now just need to reconfigure apache, which shouldn’t take long since there will only be slight changes in the new httpd.conf file.

Viewing 1 Comment

Trackbacks

close Reblog this comment
blog comments powered by Disqus