Manitou-Mail v0.9.7 and up http://www.manitou-mail.org

Database backups

Manitou-Mail stores everything into the database, including user preferences and configuration entries.

Backup

The PostgreSQL backup program is pg_dump. For versions of PostgreSQL older than 8.1, the binary or tar format and the -b (--blobs) option has to be used. For newer versions the backup of blobs no longer depends on this option, they're always included.
The advantage of binary over tar format or plain text is the data compression, which is generally quite effective with mail contents.
On the other hand, a compressed dump that would be partly corrupt is unusable whereas a tar or plain text dump can be partially recovered.

Example with binary format:


$ pg_dump -U mailadmin -b -Fc -f mail-backup.dmp mail

Restore

Into an existing database:

$ pg_restore -U mailadmin -d mail -f mail-backup.dmp

Into a not yet existing database:

$ pg_restore -U mailadmin -C -d template1 -f mail-backup.dmp

Note that these are just examples, please refer to the PostgreSQL documentation for more information.

Important: when upgrading the PostgreSQL server to a new major version, the databases must be dumped and restored.