Disaster Recovery

Anticipate disaster! The best approach you can take is a proactive approach. Here are some things you can do to be prepared.

Checkpoint Your mailboxes File

Reconstructing the mailboxes file is time-consuming, but you can avoid reconstructing that file from scratch. Save a history of past versions of the mailboxes file periodically on disk so that you can go back in small increments of time to the last good copy of the mailboxes file. True, it may be a few minutes too old to bring your system back to its exact state before the problems started, but in most cases that is better than bringing the system down for several hours to reconstruct the mailboxes file. Saving one copy of the file is not useful—suppose the corruption in the mailboxes surfaced hours ago, and you’ve been backing up the corrupt file every five minutes since then? To be on the safe side, save each set of files on a separate physical disk. Even better yet, save two copies in two different physical locations. Save as often as possible, as often as every few minutes. A script for rotating the mailboxes file is given in Example 9-5 later in this chapter.

Back Up Your Data

Have a good backup strategy. While reliable backups are essential, the ability to recover files on demand is equally important. Are you prepared to restore any part of your system right now? If so, document where the data is kept and how to recover it.

Be Prepared for More than One Disaster

Disasters can happen simultaneously at more ...

Get Managing IMAP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.