Today was time to knuckle down and get some work done. I am about 80% done moving an entire nested web site with connected database to a new server (this is going from a Linux running on a PC platform to our enterprise web server), and trying to get all the walls, roofs, and floors swapped without anyone even seeing a thing.
The first step was moving all the databases from one mySQL server to another. It’s pretty easy to do dumps of the databases as a text file of SQL statements- I did it quickly in phpMyAdmin. Most of the ones less than 2 Mb then loaded easily into the new database server (also using phpMyAdmin) but the bigger ones (one is more than 6 Mb) had to be done command line. Not too bad. Created the new accounts on the new mySQl server. Changed my connection scripts on my laptop copy of the server (having a master connection script used by 50 sites makes this easy), testing locally running my G4 laptop as a server, and all is good. This way the MovableType, discussion board, calendar, phpQuestionnaire sites running on the old server are now connected to the new database. And our primary web server is smoothly hitting the new database server.
Next is moving all of the static web content, that is easy… drag and drop FTP across two Fetch windows. The harder stuff is the network of UseMod wiki files and other directories where web permissions are crucial. These need to be tar-red up with permissions preserved and unpacked on the new server.
The tricky thing is a switchover, as the test server is running under a domain of “http://foo2……maricopa.edu/” to eventually replace the server at “http://foo……maricopa.edu/” getting the DNS timing may be tricky, and then having MovableType be able to swap over cleanly (most likely needing to rebuild all sites).
This is sounding like techy mumbo jumbo, but bottom line is that database driven sites should transport well without the fuss of dealing with static web sites.
The post "Moving the House (and hoping none of the occupants notice)" was originally pulled from under moldy cheese at the back of the fridge at CogDogBlog (http://cogdogblog.com/2005/07/moving-the-house/) on July 26, 2005.