PDA

View Full Version : When Good Data Goes Bad, or, How I Spent My Evening


MattDiamond
2007.04.04, 08:32 AM
I was at work yesterday when my wife reported to me that the Mac suddenly wasn't working. Apps wouldn't launch. Reboot it didn't help. I knew that it had been working just that morning. When I got home I found that it wouldn't even boot on my first attempt, but the second attempt with extensions off worked. Disk Utility reported some catalog problems and then actually printed some garbage before aborting the Verify. So although most of the files appeared to be accessible, something was badly wrong.

At the beginning of each month I manually clone the HD to an external drive, and halfway through the month I manually clone to an internal (used to use Carbon Copy Cloner, but recently switched to an unregisterd copy of SuperDuper.) Thankfully it was April 3 and I had just cloned to the external the night prior. So I booted to the internal backup, itself only a couple weeks old, erased the main HD w/zeroing to catch if any physical damage had occurred. This took 45 minutes so I watched some tv. Then I plugged in my external backup drive, started to clone it to the main HD and went to bed.

This morning I verified the main HD looked ok, made it the startup, and rebooted. I had lost less than half a day's work (basically a few emails.)

The first thing I did then was register SuperDuper- it suddenly seems awfully inexpensive. :-) This unlocks it's scheduling features so that I can set up the backup to the internal to occur automatically every few days. I will still backup to the external manually once a month though. (I don't want to do it more often for fear of an unnoticed problem corrupting both my backups.)

I still don't know what corrupted my disk so badly. In my 20+ years of using a Mac, I've only every lost a disk when hardware failed. This drive seems to be operating normally now.

A good disk utility might have been able to repair the damage, but I don't own one.

I was very lucky not to lose at least a week's work, but in every other respect my precautions worked like a charm. And most of the evening was spent relaxing while the data was being restored, not frantically trying to repair and recover.

I am patting myself on the back a little here, but I'm also posting this because we've all seen the horror stories here of developers who lost precious weeks or months of work when something went wrong. I'm here to tell you that it doesn't have to happen. Don't be too cheap with your bucks or your time to give yourself a safety net, and make it one that will usually get you up and running in a day or two, rather than requiring lots of effort.

I'm also thinking about having at least one offsite backup, somehow. Once or twice a year I should make a backup that I can store in my safe deposit box, or just bring to work. Not sure if this would be DVD's, a flash drive with only the most crucial data or what. Suggestions welcome.

Once my children get their own computers I'll have to worry about setting up a network backup of some kind.

I'd love to hear about other people's thoughts about backup procedures. There are lots of ways to do it, with varying degrees of expense and convenience.

EvolPenguin
2007.04.04, 09:27 AM
That does sound odd. I've personally had no problems ever with any of my Apple computers, and have never seen the need to buy an external harddrive. However, I may just go get one now.
As for an off-site backup, probably one of those portable hard-drives would work the best, they can be pretty large in space, and yet small enough to move easily.
Alex

reubert
2007.04.04, 06:19 PM
Subversion backs up all of my source to my linux box, and about 7 or 8 other machines around the country. I also have a shared directory on the linux box that I can use for files that need to be backed up.

Then my entire linux box backs up itself once a week to a second internal drive using rdiff-backup. I don't think it's very likely that 2 drives in the same machine spontaneously trash themselves, but who knows.

Think I'm pretty safe, but it would take me a little longer to get my mac back the way I like it. Sounds like your setup is better.

I've been tempted to move my subversion repository to my dreamhost server, but I figure if NZ blows up I won't be in a position to code anyway.

MattDiamond
2007.04.04, 10:19 PM
Subversion backs up all of my source to my linux box, and about 7 or 8 other machines around the country. I also have a shared directory on the linux box that I can use for files that need to be backed up.

Then my entire linux box backs up itself once a week to a second internal drive using rdiff-backup. I don't think it's very likely that 2 drives in the same machine spontaneously trash themselves, but who knows.

Think I'm pretty safe, but it would take me a little longer to get my mac back the way I like it. Sounds like your setup is better.


My setup works fine for getting me back up and running, but it's no substitute for a subversion repository, which of course keeps the history of your entire codebase. Quite different beasts. I'd love to have your setup for my code.

In fact I do have a local svn repository, but it is underused because Unity doesn't agree with it and my last two projects were in Unity. But I keep my website in svn and eventually Unity will support it. So I should look into making it non-local, at a minimum. Thanks for the idea.

Those other remote machines: are those yours, or are they on the internet? Do you feel the need to encrypt any of your backed up data? Just curious.

reubert
2007.04.04, 11:28 PM
The other machines are half mine, and half other people who are helping me out. They are just checked out versions of the repository.

Yeh it works quite well having subversion on another machine. I bought a really old PC for next to nothing and slapped a couple of big hard drives in it. I guess the ideal would be an old G3 tower or something, then you wouldn't have to go through the torture of getting a linux distro to work properly!

There isn't any point in encrypting it so far as I can see.

diordna
2007.04.05, 12:51 AM
The only Really Important Stuff I have is code, and I copy it manually to a flash drive every month or so. Everything else doesn't really matter, except my GarageBand stuff, but I wouldn't cry over it.

PowerMacX
2007.04.05, 10:28 AM
Thankfully it was April 3 and I had just cloned to the external the night prior. So I booted to the internal backup, itself only a couple weeks old, erased the main HD w/zeroing to catch if any physical damage had occurred. This took 45 minutes so I watched some tv. Then I plugged in my external backup drive, started to clone it to the main HD and went to bed.

OK, here it comes...
This morning I verified the main HD looked ok, made it the startup, and rebooted. I had lost less than half a day's work (basically a few emails.)

How... disappointing! ;) (yes, I was expecting something like "as it turns out, the backup didn't work and I had just zeroed my HD" :p )

Personally, my "backup" is my old Power Mac which has two hard disks in which I double-copy important stuff from my MacBook about once a month (in theory).
In practice, for really important stuff, like source code, I have a "redundant repository" which is like having an SVN setup as reubert's, except... in my case it's just a bunch of copies of my project folder labeled by date :D . I know, I know... but frankly I like being able to run any previous version of my apps immediately to compare behaviors. About once a week, or when I make some significant changes to my code, I email myself a copy to a couple of email boxes (Gmail + Yahoo).

backslash
2007.04.05, 12:43 PM
At the TV company where I work, I've set up our FCP edit suites to wake up in the middle of the night, back up all their project data to our Xserve using Rsync, perform various routine maintenance tasks and then switch themselves (after asking permission in case someone is actually trying to use them). There's also a nice little app where people can disable this if they want to render overnight.
Now, personal backup... Hmm... :sneaky:
Occassionally I drag some stuff onto a firewire drive, and I keep some really important stuff in an encrypted disk image on a pen drive.
Maybe I've found a new use for my Mini after I get round to replacing it. :)

wyrmmage
2007.04.07, 07:44 PM
personally, I keep all of my code on a 5 GB external hard drive, and then make backups of all the information on my iBook annd thinkPad every week or so. This allows me to use my code on different machines, which (since I'm currently a studennt), is quite useful, but I wouldn't recommend it if you have confidential code that you need, considering my first external drive got stolen :(
-wyrmmage