Four years ago, I bought my first Mac, a 20″ iMac G5 which I named Zeus. It’s a great machine, but I’ve decided to sell it. As I talked about before, I bought a Macbook last January, which I named Hera (Zeus’ wife). In the last few months, I’ve noticed that Hera is so much more powerful than Zeus. With the rise in online Flash video, I’ve noticed Zeus stutter and be slow, but Hera has always been able to run it just fine. I decided it was time to put Zeus out to pasture and begin using Hera full time.

Now, Zeus’ slowness wasn’t the only reason. Whenever I travel, I bring Hera with me, which has meant using her (yes, I call it ‘her’) exclusively for weeks at a time when I’ve gone to Florida or New York or even to my parents’ place in London. In that time, using Hera exclusively has been wonderful. She’s fast and light and easy to carry. Her keyboard is wonderful, unlike the old-style one that came with Zeus.

I’m also moving to my parents’ place for a few months. Networking at their house has always been tough. I’m convinced the place acts as a Faraday Cage, so 802.11g wifi was very spotty in most places (Cell signal is also a problem). A few months ago they bought an Apple Airport Extreme, covering the house in 802.11n WiFi, which has much greater range. It’s a great fit for their house, and Hera works just fine on it. However, Zeus is too old to use it; he only can do 802.11g. The house used to have Cat5 cable running to the bedrooms, but they had it removed when they renovated their kitchen. The only place to put Zeus would be next to the router, in my mother’s office, which she likes to keep slightly neater than a pigsty. As much as I love my mother, I wouldn’t be able to work there. Without an internet connection, Zeus would be pretty useless.

So, the time came to get rid of Zeus and use Hera full time.

Hera, as a base model Macbook, came with an 80GB hard drive. I have nearly 30GB of music and regularly use BitTorrent to download, um, Linux, so I needed a bit more space than her current configuration offered. Zeus came with a 250GB hard drive, which was fine, but I decided that a bigger hard drive today would be worth it in the long run, so I picked up a 500GB SATA laptop hard drive and an external enclosure at one of my local Mom & Pop computer stores.

The first step to switching my hard drives was getting all my data onto the new one. I regualrly use a program called SuperDuper! to backup my computers. SuperDuper!’s main feature is that the backups it makes are exact copies of the hard drive, including all the system files. It’s backups are bootable; in the event of a hard drive failure, you could just switch the disks and be back in business in a few minutes. Though Zeus’ drive never failed, the ability to boot to my backup has saved my butt a few times. The first step with a backup drive should be making sure that it works. To do this, I used DiskUtility to “zero out” the drive, which essentially writes 0 on every part of the drive. This gets rid of whatever was there before (which should have been nothing) and also makes sure that there are no errors on the drive. The drive can detect them if it sees them, so this step makes sure it checks the whole thing. With this step, Disk Utility also sets up a single HFS+ filesystem for use by Mac OS X.

With the drive all prepped, I simply ran SuperDuper! with the default settings, which made an exact copy of the internal drive to the external one. It took a while to move about 30GB of data, but it went. At the same time, I used SuperDuper on Zeus to update its backup. Registered versions of SuperDuper! can do “Smart Update,” which only updates the changed files, resulting in an exact copy, but taking much less time. I ran this Smart Update every week, so my backup is always very fresh. With both drives mirrored to externals, it was time to upgrade Hera.

The Macbook hard drive is simple to replace. With the machine switched off, remove the battery, undo three very small Phillips head screws, remove the L bracket, and pull the white tab. The drive still has 4 very small Torx T8 screws connecting it to a shielding (and the aformentioned white tab), but I only had a T10 bit. I eventually just used flat-nose pliers to grab the screws and turn the drive, which got them off very easily. After putting the shielding on the 500GB hard drive and reattaching the screws, I simply slipped the drive back into its slot, reattached the L bracket, screwed in the three screws, and put the battery back in place. The machine booted just fine, and looked just like it had before, except this time it had a 500GB hard drive. Frankly, it was a really simple process.

Now, for merging the data from the two machines. Mac OS X is centred around the Home foder, represented by ~. Every file you save, and data from programs you use, should be stored there, and all the software from Apple does, including iTunes. I didn’t really use iTunes on Hera on an ongoing basis. If I were away from home, I would use it for downloading podcasts, but any other time the library was basically empty. This made moving my music simple. After attaching the external backup of Zeus to the newly well-endowed Hera, I deleted the contents of Hera’s ~/Music folder and dragged over the contents of Zeus’. iTunes stores all the library data in ~/Music/iTunes so all my playlists, play counts, dates added and songs moved along with the folder. Once the files were moved, I opened iTunes on Hera and saw all my music, just as I’d left it.

There was one problem, though. Aparently, iTunes also stores the size of the iTunes window in the iTunes library. The window on Zeus was taller than Hera’s screen. I couldn’t resize the window, because the resize area (the bottom right corner) was off the screen. Unlike most porgrams, pressing the green button in the top left of the iTunes window doesn’t “zoom” it to the full screen, but switches to the mini-player. After some Googling, I learnt that holding Option while clicking the green button performs the normal action, resizing my iTunes window to a size that fit fully on the screen. Crisis averted.

The rest of my Home folder could just be dragged over. The Pictures folder was just like the Music one, with the contents from Zeus replacing the things from Hera. Most of my documents have been stored in my Dropbox for several months, which replaced FolderShare (as I discussed in my initial post on my Macbook). I didn’t even have to touch them. Dropbox kept them perfectly in sync for me. There were a few odds and ends in my Documents folder which I moved over, and some folders with files from my jobs, which all moved over in a few minutes.

The next step to merging my computers was making sure I had all the programs I need. Most of the programs I’ve needed I either used exclusively on my laptop (in school, for example) or used on both machines. Just to make sure, I opened up both /Applications folders and went through the lists, deciding which programs needed to be moved. Some programs had data that needed to be moved, which is stored in ~/Library/Application Support. These files can just be moved over, due to Mac OS X’s fondness for using xml files to store data. While comparing programs, I found my MAMP program folder, which contained some PHP work I’d done a few years ago. I moved the database files and the htdocs folder into a new install of MAMP on Hera. Once I had all my program data moved over, I copied over the contents of ~/Library/Scripts where I had some Applescript and Bash scrpits, and ~/Library/LaunchAgents, where I had a launchd task that runs every 15 minutes.

The last thing to get merged were my Chat Logs. I had chat logs going back to 2003 on Zeus [some of which actually predate my Mac], and wanted them moved to Hera. However, Hera had her own logs from all the conversations I’ve had on her. For the last few versions, Adium has logged its chats in per-conversation files, which made marging the two groups of logs really simple. Adium stores its chat logs in ~/Library/Application Support/Adium 2.0/Users/Default/Logs as folders for each acount, with contact folders in those, and then folders for each conversation. To merge them, I made copies of both Logs folders, and used rsync to merge them. rsync is a program for keeping folders in sync. It has many features that are designed for syncing over a network, but I only needed its local features. With the Zeus logs in a folder called Zeus and Hera’s in Hera, I ran

$ rsync Zeus/ Hera

The / at the end of Zeus/ tells rsync to sync the contents of Zeus into the Hera folder. After a bit of churning, rsync had copied all the conversations from my Zeus logs to the Hera ones, perfectly. After copying the contents of the resulting Hera folder into ~/Library/Application Support/Adium 2.0/Users/Default/Logs, I had all my logs from the past 6 years in one place, indexed and searchable by Adium, with one terminal command.

So, after a hard drive purchase, several hours of backup, moving files and a simple rsync command, I have all my files, music, programs and chat logs from two computers merged into one tiny laptop. I plan to keep this computer for a few more years, and I’m not anticipating needing to make any more changes to it, beyond some new RAM which will be even easier to change than the Hard Drive (no Torx screws). All in all, I’m quite happy about the result.