Beskos

Zelf hosten

Back up and update

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

Bijgewerkt:

Deze vertaling is uitsluitend voor het gemak. In geval van afwijking is de Engelse versie doorslaggevend.

Dit artikel is nog niet vertaald naar uw taal, dus u leest de Engelse versie. De vertaling is onderweg.
Inhoud

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.