Unix power of Mac OS X: Backup

Our lab has three Macs. One 20-inch iMac G5, one 17-inch iMac G5 and a Mac mini. There was a PowerMac G4 but it is not serving for many people downstairs. Because our lab work rely heavily on computer: we create Excel worksheet to help us calculate reaction formula easily and then keep record of our every PCR reaction(in silicon and print out as hard copy), we store digital pictures of the plants, bacteria and such, we need to use computer to calculate phylogenetic tree, use Lasergene to do DNA operation etc., so we really need to make sure our data is safe.

Before I came to this lab, they were copying files manually through Apple Personal File Share from 17-inch and Mac mini to 20-inch. And then manually copy files to an Firewire external hard drive from the 20-inch iMac. I set up the 20-inch to copy the files automaticly to external hard drive soon after I came to my current lab by using Automator. However, it is not very good doing it that way, because 1). People forget to copy files from 17-inch and Mac mini. 2). 10Mb ethernet is not fast enough for copying files of over 3 GB. 3).Every time it takes a long time to copy everything through Firewire to external hard drive. 4). Copying folder and override in Mac OS X will override everything, so if you accidently delete something here, and you automatically back up files everyday by copying and overriding folders, you end up actually losing files.

So later I think I should try something else. Because Mac OS X is a Unix system, we can run rsync. One good thing is Mac OS X has SSH and rsync built in. So I think the best way to back up all the files on the three computers is to use rsync over SSH to have one copy on 20-inch and on the external hard drive. Good thing about this method: 1). The back up will be incremental, so every time it will take very short time to back up because the computer will only copy new and changed files. 2). Everything about back up can be done automactically, people in my lab are freed. 3). This way of back up will never delete file by overriding folders.

It is not that difficult to set this up. I just met some problem making SSH connection between these computers password free. By using public signature, it is possible you can SSH connect two computers without entering password, and this is neccessary for automatic connection and rsync.

Now everything is running almost perfectly. These computers will sync files every work day at a given time. And that’s actually easy to set up as long as you know a little bit things about Automator, rsync, and CLI. Also, Lingo is a very useful software that helps you take advantage of Launchd.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.