Archive for category Backups

A Longish Tale of Hard Drive Crashes, Apple TV Hacks and Woe

56723B03-C893-4B4E-838C-365D5635ACDD.jpgOK, this is the set up for my next few posts.

So I had this very nice media setup. I had an old 1st gen 17″ iMac I had got when porting some software over to the Intel Mac. Apple had sent me this hacked Intel machine in a G5 PowerMac case to do the development but I had to return it. After returning it I got the 17″ iMac which I use at home for some development or when dealing with clients who are in India or other distant time zones. Anyway it had become primarily the media server and secondarily a backup machine for development.

I had one drive that I kept various odd stuff on and a second, 1 TB drive, just for movies. Now I kept meaning to get a second drive to mirror that media drive but somehow never had the spare cash laying around to pick one up. (Lots of medical bills due to sick kids) Now I did backup everything else and I’m ultra-paranoid backing up my business machine. (3 rotating full backups and 3 rotating daily backup disks with 6 individual days maintained per disk + infinite backups of source code)

I finally picked up the extra drive about a month ago and was doing a backup when my toddlers came running in and tripped over the cords. Hard drives went flying. I went screaming like someone out of a cheesy 80′s action movie yelling, “NOOOOO!” in slow motion.

Read the rest of this entry »

2 Comments

Turn Duplicate Files into Symbolic Links

Over at Ars Technica someone asked how to convert duplicate files into symlinks. (For those of you not familiar with unix, symlinks are like aliases but work with unix commands as well as most OSX applications) Originally I was going to do this using fdupes (installed via macports). However it is surprisingly slow. I came upon a Python program by Justin Azoff called dupes.py which runs much faster. (He discusses his methadology at his blog) Further, because it is a Python class, it is easy to call from a Python program.

The following assumes you have dupes.py installed (either in the same directory or the Python path)

Read the rest of this entry »

2 Comments

Review: BlacX

blacxOne problem with the way most people do backups is that they simply have one or two external hard drives hooked up to their system. Believe me, you’ll eventually rue the day if this is your setup. I used to use a dedicated large external combined with a bunch of those small portable USB powered hard drives that I could carry around. I learned the hard way though that those little hard drives aren’t that reliable over time. So I’ve switched to a new system I’ve been using for a couple of months now.

It’s the BlacX eSata/USB docking station. It’s quite cool. You plug it into either an eSata or USB port and then simply drop SATA hard drives (either 2.5″ or 3.5″) into it. (Make sure to turn it off before swapping disks) This makes it very easy to buy cheap drives and use them for backups.

Read the rest of this entry »

No Comments

Backing Up

For the last few years I’ve used various Python scripts to do specialized backups. The scripts call rsync which is a very nice program that only copies files if there is a difference between the source and target files. It also uses compression and can backup across networks.

You can also use hard links trick to have individual folders of backups (say for each week) but only have one file actually stored on the hard drive for each unique file. (That is if you have three files that are all the same it’ll appear to the Finder as three files but to the file system as one) I might do a post on this in the future but for now there is a generic explanation at MacOSXHints. The important thing to note is that you probably shouldn’t use Apple’s supplied version of rsync. Some people have noted that despite significant improvements Apple’s version still has some big problems with extended attributes and resource forks. So I’d suggest installing and using the latest rsync from MacPorts or Fink. (I use MacPorts and am using rsync 3.0.5 without trouble)

However I’ve discovered a new program that does all the above for you without all the hassle. It’s called rsnapshot and is available on MacPorts. It’s quite nice and worth using. In fact it probably does 50% of what my current backup scripts do.

Read the rest of this entry »

1 Comment

Scheduling, Cron & Launchd

A lot of people wonder how to schedule things to run under OSX. If they are familiar with Unix they probably know about cron (or the more versatile acron) Back with Tiger (10.4) Apple got rid of cron in preference for a new utility called launchd. The advantage to launchd is that it replaces several utilities (primarily boot up ones) and is muhc more versatile. The downside is that it’s a bit of a pain to use compared to cron because you have to generate plists to use it. While there’s a certain elegance to using XML it’s obviously much more laborious than cranking out a line in cron.

Of course if you’ve never used cron little of that makes any sense. So let me cut to the chase. Download Lingon which is a very nice little program for modifying and managing launchd configuration files.

Let me give you an example of where you’d use launchd.

Read the rest of this entry »

No Comments