Have you ever thought you’d lost at least a couple of days of client work? Have you ever actually lost it? Do you remember that sinking feeling in the pit of your stomach? And did you have the relief of realising that your automated backups could come to your rescue?
Well, a couple of Fridays ago I thought I’d just tick a small job of our development list before shutting down for the weekend. Turns out what I needed to do this had already been built a couple of days ago in a different project but not yet ‘committed’ to our code repository.
So, I go into the other project and commit the outstanding changes in there (which included about 2 days worth of work). Yes I should have committed it at the time. Then I decided the comment I’d given wasn’t descriptive enough so I’d go back and change it.
Except instead of undoing the last commit I used the wrong command and completely deleted it. It was really gone, and because I’d been lazy and never ‘pushed’ up to the code server I couldn’t get it back again. Oh no…. (and whatever other expletive you can imagine)
Anyway, after a fair amount of swearing and banging of things, I remembered that of course all of our servers, including our development box, are automatically backed up using the tools included in Amazon Web Services. A slight sigh of relief. All I needed to do was attach last night’s backup to the dev server and copy the stuff I’d deleted from there. Took me about 10 mins.
Backups are important for a number of reasons – usually we worry about disk failure or getting hacked, and these are all really important. But protection from our own idiocy is a good reason as well!