I Prefer Not to Lose My Data


As I said in my post, “Data Violence”, I discovered recently that my backups were distressingly incomplete. One of the things I had not been backing up were my application preferences. It turns out these contained, in at least one case, some rather critical data. You might already be backing up your application preferences and figuring that I got what I deserved. But before you rush to judgment, consider: what do you think a preference is, after all?

I consider my preferences to be tweaks to the application’s look and feel, like what things to show on the toolbar, how big the window is, what window to show first on startup, default fonts, colors, sizes, and so forth. I don’t expect the preferences to contain the main data or anything that the application needs in order to understand or index the main data. I figure that’s going to be in the data files or documents I create.

Moreover, a frequent debugging technique is to delete preferences, because in certain cases they get corrupted and can cause the application to act strangely or in some cases to stop working entirely. Throwing away the preference file is a way to restore the application to its factory state—not a way to request that my data be lost.

Rest assured, most applications do treat preferences the way I believe they should be treated. So I hadn’t been backing up my preference files. But in the case of Mac OS X Mail, though it doesn’t store my email messages in its preference file, it does store crucial indexing and account information there. This means that although I was faithfully backing up ~/Library/Mail, the data in there wasn’t accessible without the preference file.

In case you’re wondering, I didn’t lose all my email. After a few heart-stopping failed attempts and some investigation, I realized that I could import my mailboxes as if they were external mail from some other mail program. I then had to reconstitute all of my account information, and mark all of my messages as “read” (the importing process for some reason made them all look “unread”).

I don’t believe that bits of data like account information, including passwords and protocols, and an index into my mailbox folders, including which messages have been read, count as “user preferences”. Those are things needed by the application to do its job. Storing those in the preference file is like saying that I have a user-specific preference that the application find my data where I last left it.

Obviously, my own beliefs and ideals about what constitutes preferences aren’t protection against data loss. I back up my preferences folder now. So should you.

Posted: Wed - June 8, 2005 at 10:07 AM        


©