{{define "content"}}

Backup & migration

Full backup

Download a full backup of all persistent state — the database, every domain's DKIM key and the application credentials. Use it to move the whole server to a new machine: restore it into a container of the same SelfPost version, with the same data mount, before first start. TLS certificates and the mail queue are not included.

The backup file is a secret (it contains private keys and credentials). Store and transfer it securely and delete it once the restore succeeds. Encrypting it below is the simplest way to do that: the download is then a .spbk file that only the password opens.

{{if .BackupErr}}

{{.BackupErr}}

{{end}}
{{template "encryptfields" .}}

Import a domain

Move a single domain here from another SelfPost instance using a domain export file (from that domain's page). Its DKIM key and application passwords come across, so the published DNS record needs no change. The export file is a secret, like a full backup.

{{if .ImportErr}}

{{.ImportErr}}

{{end}}
{{end}}