Beskos

Alojar por si

Back up and update

What to copy, why it has to be copied together, and how to move to a new version.

Atualizado:

Esta tradução é fornecida para conveniência. Em caso de qualquer discrepância, prevalece a versão inglesa.

Este artigo ainda não está traduzido para o seu idioma, por isso está a ler a versão inglesa. A tradução está a caminho.
Índice

An instance keeps its state in three places: the database, the mail server's own storage and object storage. They are one backup, not three.

Back up all three together

A mailbox's metadata is in the database, its mail is in the mail server's storage and its attachments and files are in object storage. Copies taken at different moments restore into an instance that disagrees with itself: messages referring to files that are not there, or accounts whose mail predates them.

The repository ships scripts for a full backup and restore of the three as a set.

Test the restore before needing it

A restore script that has never been run is a hypothesis. Run it once into a scratch environment and confirm an actual mailbox opens with its mail in it.

Updating

Pull the new image or rebuild from a newer tag and restart the api container: it applies pending migrations itself, in order and idempotently.

Read the release notes for the version being moved to. A migration is never rolled back automatically, so returning to an older version after an upgrade means restoring from backup rather than downgrading.