I recently bought my very first Mac ever. After years of struggling with crappy movie editing software, draining system resources and general bloat on Windows I finally bought myself a beautiful 24″ iMac and so far the experience has been every bit the bundle of awesomeness I’d hoped it would be. Except for TimeMachine.
I’ve got a 500GB Buffalo Linkstation I used for backup and for storing music files for a year. It’s a great machine that just works and serves my two laptops and a desktop very well. The problem is that the backup software what comes with it only works on Windows.
Crap.
So, rather than let my Linkstation become an expensive bookend, I hit the Internet to find an answer and wasn’t entirely pleased with the options:
1) Turn on this undocumented and apparently not very stable feature on OS X.
2) Rebaseline my Linkstation with an “opened” firmware and use rsync.
3) Purchase some kind of third party backup software for Mac like SuperDuper! that does backup instead of TimeMachine
I went with option 2. Yeah, I know option 1 sounds easier, but the stuff I read really made it sound unstable and like a waste of time, and anyway the geek in me was really warming to the idea of a Linkstation that was basically a really cheap Linux computer with a giant hard drive.
Many hours later I’m ready to declare success. So what if I could have just bought a couple of TimeMachine devices (at the same hourly-billable equivalent rate). Instead I’d learned something new that reinforced my technical chops.
So dear readers, here’s how you do it. Specifically, here’s how you backup from an iMac running OS X 10.5.2 to a Buffalo Linkstation Pro LS-GL running on an ARM processor. With any other combination your results may vary so make sure you read up before you start.
Backup all your data
The stuff you’re about to do has the potential to brick your Linkstation if you screw it up. Yes, brick it, as in won’t turn on, unrecoverable, gone, expensive book-end. There are some instructions on un-bricking a Linkstation but thankfully I didn’t have to try them out.
Download the jtymod firmware for Linkstation
Some kind soul created a hacked firmware called jtymod that is basically the standard firmware with telnet, ssh, and a few other necessary services enabled. Make sure you get the “fixed” jtymod version not the regular jtymod version. I don’t know what the fix was for, but the forum posts I read made it sound pretty necessary. Once you’ve downloaded it, you just unzip it and you have both the installer and the binary images you need to install. This part worked like a dream for me so I don’t have any advice for troubleshooting. If you run into trouble, the Linkstation hacker wiki is an excellent resource.
Reset the Root Password

You should see an option to reset the root password on your linkstation now as shown in this screen shot. After you clear the password, you should be able to set it again by logging in as “root” with a blank password and then changing it:
ssh root@192.168.1.1 passwd root
Install it using the included installer exe
Took me a while to figure out the installer was included in the zip file. I looked all over Google for general instructions on “how to install firmware images on a Linkstation” before I finally figured out I didn’t need them. Just run the exe included in the firmware zip file. Maybe you’re smarter than I am and figured that out yourself.
Write a simple shell script using rsync
The BackupUsers.sh shell script is stone simple:
#!/bin/sh rm /Users/trcull/Documents/BackupUsers.stdout rm /Users/trcull/Documents/BackupUsers.stderr echo "Starting BackupUsers.sh" > /Users/trcull/Documents/BackupUsers.stdout date >> /Users/trcull/Documents/BackupUsers.stdout sleep -60 rsync -va /Users admin@192.168.1.6:/mnt/disk1/macbackup &> /Users/trcull/Documents/BackupUsers.stdout
You can see some much more involved examples on the rsync site and on the Linkstation wiki rsync page.
Setup some shared keys so you don’t have to type a password
If you want this job to run unattended, you have to set up some shared keys between your Linkstation and your Mac.
Configure it to run using launchd
Apple has decided to replace crond with something called launchd. There’s a decent writeup for using launchd to get you started. I ended up creating a plist file that looks like this:
< ?xml version="1.0" encoding="UTF-8"?> < !DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Debug</key> <true /> <key>ExitTimeOut</key> <integer>7100</integer> <key>Label</key> <string>net.kroppel.BackupUsers</string> <key>OnDemand</key> <false /> <key>Program</key> <string>/Library/Scripts/CustomScripts/BackupUsers.sh</string> <key>StartInterval</key> <integer>7200</integer> <key>ThrottleInterval</key> <integer>7000</integer> <key>UserName</key> <string>trcull</string> </dict> </plist>
You may wonder why I have a ThrottleInterval in there. That’s because my rsync exits with a code 23 because it doesn’t have permissions on some of the directories it’s trying to copy. This causes launchd to think the script failed and needs to be spawned again. It took me days of my Linkstation constantly thrashing on its drive before I realized what was going on.
Done!
Now you’re in backup heaven. Still glad you didn’t just give in and buy a Time Capsule instead?