The importance of regular data backups

I still haven’t figured out whether it happened because of pure stupidity, temporary brain malfunction or low caffeine concentration in the blood, but a week ago, by mistake, I wiped the MBR of my primary desktop’s hard disk and also (because, you know, the MBR alone is never enough!) the boot sector of the first NTFS partition, where all my personal data was, while messing around with the install-mbr utility early in the morning.

My last full backup had been done 8-9 months ago, just before switching to Windows 7 RC. Even after such a criminally insane mistake, my partition could still be recovered relatively easily using Testdisk, but I, still for unknown reasons, decided to use the Windows utility Bootrec.exe with the /fixboot and /fixmbr switches to do that job. Unfortunately, not only did it not work as expected, but, after using Testdisk to browse my data, I noticed that entire directories were missing from the list. I’m not sure if I should blame bootrec. Maybe it’s not meant to do such things. I don’t know. I should have used the tool I knew it would work in the first place.

From that point on, I tried several utilities. The only program that could still read the exact size of the NTFS partition was gparted (through ntfsprogs). After several hours, having tried Testdisk, ntfsprogs and the Windows Recovery Console tools and being extremely careful so that I did not touch the contents of the partition (my data!!!) in any way, just before trying PhotoRec as a last resort for raw file recovery, a deep partition scan with Testdisk revealed the NTFS partition. The size was wrong, but all files were listed properly. I can tell you that I did not miss the opportunity; I mounted a SAMBA share and copied everything there.

Fortunately, data is safe now. I spent a week checking it and cleaning it up and everything is there.

There are a couple of things I’d like to say to everyone:

  1. Never use utilities that can destroy critical parts of your partitions by instinct. RTFM!
  2. Never mess with the partition table or the partition’s boot sector etc early in the morning. I am serious! There are numerous great things you can do in the morning! Stick to those great things, unless it is your daily routine to recover data or recover boot sectors and unless you always know what you are doing.
  3. Backup data regularly. Your desktop computers and servers are equally important. Schedule daily backups of critical data. There are many great open source backup tools, like rdiff-backup, rsync, unison, BackupPC to name a few. Also Windows includes a backup tool that is very convenient to setup and use. There is no excuse for not doing frequent data backups.

They say that it is the idiots who learn from their own mistakes. Smart people learn from the mistakes of others. Stick to that principal.

The importance of regular data backups by George Notaras is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Copyright © 2010 - Some Rights Reserved

George Notaras avatar

About George Notaras

George Notaras is the editor of the G-Loaded Journal, a technical blog about Free and Open-Source Software. George, among other things, is an enthusiast self-taught GNU/Linux system administrator. He has created this web site to share the IT knowledge and experience he has gained over the years with other people. George primarily uses CentOS and Fedora. He has also developed some open-source software projects in his spare time.

2 responses on “The importance of regular data backups

  1. Giorgos Keramidas Permalink →

    Ouch! At least you found a way to recover your important files.

    I try to keep daily backups of my laptop (pretty much the only machine left around here). But I’m also guilty of often skipping the daily backups for 5-6 days in a row. I know that this is a silly thing to do, but I still do it. To make things ‘easier’ I have scripted my backup process, so all it takes is a daily run of:

    sudo /root/backup.sh 1

    for a full level 1 dump of all my partitions, and

    sudo /root/backup.sh 2

    for a level 2 incremental dump of all the files modified since the last level 1 dump.

    Yet, I still skip some backups. Go figure…

  2. George Notaras Post authorPermalink →

    Hi Giorgos.

    Fortunately, every piece of data was recovered successfully. My initial decision to experiment with bootrec.exe at the most critical moment of this incident instead of using a tool I have used in the past and trust (Testdisk) made me very skeptical about how I handle situations like this. Also, I should have followed some standard procedures like creating an image of the whole disk before trying any kind of data recovery.

    As for skipping daily backups without reason, I can assure you that this is an unexplained behavior of mine too! During the last years, I’ve written numerous backup scripts, but I always focused on some machines I used as servers. Backing up my desktop or laptop had always been a low priority task. But, I’ll set some new priorities from now on.

    Also, I think I will have to reduce the number of computers that lay around at home to the absolute minimum. That should make things more clear regarding which kind of data is important and which is not.