Email folders (often stored as mbox flatfiles) are not well-suited
being backed up with an incremental backup like the one offered by
Cedar Backup. This is because mbox files often change on a daily
basis, forcing the incremental backup process to back them up every day
in order to avoid losing data. This can result in quite a bit of
wasted space when backing up large folders. (Note that the alternative
maildir format does not share this problem, since it typically uses one
file per message.)
One solution to this problem is to design a smarter incremental
backup process, which backs up baseline content on the first day of the
week, and then backs up only new messages added to that folder on every
other day of the week. This way, the backup for any single day is only
as large as the messages placed into the folder on that day. The
backup isn't as "perfect" as the incremental backup process,
because it doesn't preserve information about messages deleted from the
backed-up folder. However, it should be much more space-efficient, and
in a recovery situation, it seems better to restore too much data
rather than too little.
This is a Cedar Backup extension used to back up mbox email files
via the Cedar Backup command line. Individual mbox files or
directories containing mbox files can be backed up using the same
collect modes allowed for filesystems in the standard Cedar Backup
collect action: weekly, daily, incremental. It implements the
"smart" incremental backup process discussed above, using
functionality provided by the grepmail
utility.
This extension requires a new configuration section <mbox> and
is intended to be run either immediately before or immediately after
the standard collect action. Aside from its own configuration, it
requires the options and collect configuration sections in the standard
Cedar Backup configuration file.
The mbox action is conceptually similar to the standard collect
action, except that mbox directories are not collected recursively.
This implies some configuration changes (i.e. there's no need for
global exclusions or an ignore file). If you back up a directory, all
of the mbox files in that directory are backed up into a single tar
file using the indicated compression method.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_getBackupPath(config,
mboxPath,
compressMode,
newRevision,
targetDir=None)
Gets the backup file path (including correct extension) associated
with an mbox path. |
source code
|
|
|
_getTarfilePath(config,
mboxPath,
compressMode,
newRevision)
Gets the tarfile backup file path (including correct extension)
associated with an mbox path. |
source code
|
|
|
|
|
_backupMboxFile(config,
absolutePath,
fullBackup,
collectMode,
compressMode,
lastRevision,
newRevision,
targetDir=None)
Backs up an individual mbox file. |
source code
|
|
|
_backupMboxDir(config,
absolutePath,
fullBackup,
collectMode,
compressMode,
lastRevision,
newRevision,
excludePaths,
excludePatterns)
Backs up a directory containing mbox files. |
source code
|
|