Mail: Backups, encryption and verification

The Backups section: schedule, off-site storage, encryption and restore verification

A backup contains the messages, the mailboxes and domains, calendars and contacts, the DKIM signing keys and the settings. It is made at night, when nobody is using mail. Backups are on by default and the last seven are kept.

Off-site storage

A copy on the same server will not help if the server is lost entirely. Point the panel at external storage — FTP, FTPS, SFTP or S3 — and the copy is sent there as soon as it is made.

Encryption

A copy on someone else’s storage sits with a stranger, so it is worth encrypting. Turn on Encrypt copies sent off the server and the panel creates a key. The copy on the server itself stays unencrypted, so restoring never depends on whether the key was lost.

Store the key off the server — in a password manager or on paper. A key kept only on the server is useless exactly when the server is lost, which is the one case off-site copies exist for. Press “Show the key” to see it; it is created once and never changes.

We encrypt with ordinary gpg, so a copy can be opened anywhere with just the passphrase, even without this panel: gpg --decrypt mail-….tar.gz.gpg > mail.tar.gz

Restore verification

“There is a backup” and “the backup can be restored” are different claims. Press Verify next to any copy: the panel really loads its database into a temporary database and counts the domains, mailboxes and aliases. Live mail is not touched. The result of the last verification is shown in the section, and a failed one is emailed to you.

Restoring

The Restore button replaces the current mail, mailboxes and calendars with the contents of the copy. The panel asks for the administrator password and warns that this cannot be undone. Mail is not accepted while restoring — that is deliberate, otherwise a new message would be overwritten.