Backups - and how much they are worth

Posted on 20.8.2008, 23:27 by alcaeus
Posted in Ayumi, Work
Comments: 0

Backup (computing): A copy of a file or record, stored separately from the original, that can be used to recover the original if it is destroyed or damaged.
From en.wiktionary.org

I actually meant to write something new way sooner, but then I also meant to write about something else than backups. I just need to write this one down.
It was yesterday that I had enough motivation (and caffeine) to work on Ayumi's update system again, this time finalizing the package builder. I was going to work on the installer as well, but then I decided against it. However, when I was laying in bed wide awake with my girlfriend wanting to finish her book, I thought that maybe I could manage working another couple of hours. At 4am then I had the installer ready for a first test run, a dry run however. That means that it's only going to tell me what it would be doing if I had the gutts to test it right away. Since it was late and I wasn't sure about the quality of my code (it tends to be bad if written between 3am and 7am), I went back to bed and postponed the dry run.

This afternoon I pulled up Eclipse, I powered up Firefox and navigated to the updates module. Since I was so used to clicking through the installer from a different dry run the day before, I did just that, until a not-so-friendly error message showed up:
Fatal error: undefined function module_installer::parse_module_file in module_installer.php

Ok, so I knew why it was a dry run. I switched to Eclipse only to get a popup message that the file was deleted and if I wanted to save it. Of course I did; I learned to save often when my 11th-grade-teacher decided to pull the plug on all computers in the lab. The other files showed the message "The resource blablabla was not found in the file system". With an already pounding heart I refreshed the project, only to find that the only file left in it was the module installer I just saved again. It then dawned on me that I hadn't prepared the system for a dry run, and that some bug in the module installer (that was the only untested component at the time) managed to delete every single file in the project. It was pure irony that the installer itself was the only thing left of Ayumi at that point in time. That's when I realized that I had just effectively killed more than 10 months of hard work, almost 30k lines of PHP code that I wouldn't be able to write again if I had to.

So, after two cigarettes that were way too short, and a glass of Martini that was way too empty to begin with, I decided to see what good recovery programs I could find. After a while I managed to find one that wouldn't only show me the files in trial mode, but would actually restore some, I installed it. I knew that most (if not all) files would fall below the program's 64KB-limit, the only question was: how many files will it find?

Surprisingly, it managed to find almost all of them, and they were in good condition. I immediately saw that the package builder was missing, but after figuring out how I could use Eclipse's history function, even that was not a problem. Also, all package files for the blog, gallery and the two modules I use for the bar were there, so it was easy figuring out that those modules were restored completely. Now I only have to test the common module to see if there's anything missing, but since the first test run didn't indicate any missing include files, most of the logic is there, maybe even all. I'll just have to go over it in the next few days and make sure nothing's missing.

However, this thing taught me that I really, really need to work on some good backup solution. I simply don't ever want to have that feeling again...the feeling that you've just shredded months and months of good work, simply because you clicked once too much.

Greetz
alcaeus

« Backups, part 2 Finally here »

Comments

You may not post comments.

"alcaeus.org" is powered by Ayumi © 2007-2008 by alcaeus