Movin' on up

My last post was about a server migration at work; this one’s about moving my own stuff, an operation completed late last night. It was easier in that it’s less critical (nobody’s likely to freak out if my blog disappears for a day) but harder in that it also involved mail. I hate dealing with mail; though I did manage the switch without losing any, as far as I know. My thanks to the JohnCompanies.com staff for helping this go smoothly.

Upgrades include:

  • The big one: FreeBSD 4.x to 6.1
  • Apache 2.0 to 2.2
  • MySQL 4.1 to 5.1
  • Postfix 2.1 to 2.2

I’m also using portsnap instead of CVSup for keeping the ports tree up to date – much cleaner.

It feels all shiny and new. A server move is a good time to do upgrades – though not massive ones, because you don’t want to be troubleshooting two things at once if things go wrong. In addition to the software freshening I did a lot of de-crufting and tidying, now that I kind of know what I’m doing. (I still remember when I started seriously being my own FreeBSD server admin, about three years ago. The filesystem was a strange sprawling city and me a doe-eyed kid fresh off the bus. /usr/local/etc/what?)

The only upgrade that was any kind of pain was MySQL. I copied over the actual database files and in a couple cases I had to revert to SQL dumps to work around some odd problems. (One example: I’m sure it was my fault, but in my case the mysql_fix_privilege_tables command was more like mysql_fuck_privilege_tables.)

I was pretty selective about what I brought over from the old server. Most of the web files I pulled over in a single big rsync fetch, but other pieces I grabbed only as needed. A one-liner like this (which I called get.sh) was handy for that:

rsync --archive -vv --rsh=ssh ME@OLDHOST:$1 /var/oldserverstuff

E.g. get.sh /usr/local/etc/postfix/main.cf would fetch a copy of the older server’s main.cf to the holding pen, whence I’d move the file or extract the bits I needed. Works on whole directories, too, which is key. I’m digging rsync lately. I used it to pull down a local backup of the web files, using the new-to-me --bwlimit option to avoid hogging my house’s entire broadband connection.

More specific updates to come. And let me know if you find anything I messed up!



Share: