{{define "title"}}Backups - Email Server{{end}} {{define "content"}}
Downloads a single archive of everything under server_data/ — the database, every mailbox's encrypted mail, and the master key that decrypts it. The database is snapshotted consistently (SQLite's VACUUM INTO) so the backup is never caught mid-write, even while the server keeps running.
Automatically writes an unencrypted whole-server backup straight to a folder on this machine (not the browser) on the interval below, and deletes the oldest ones once more than "keep" exist. Manual (the default) means nothing runs automatically — use "Run backup now" or the download button above whenever you want one.
Restore is a command-line operation, not a button here — it replaces every file under server_data/ wholesale, including the database this running process has open, which isn't safe to do to a live server from inside its own web UI. Stop the server, then run:
./mailgoserver -restore-server -in backup.tar.gz [-restore-passphrase "..."] [-force]
-force is required if server_data/ isn't already empty. -restore-passphrase is only needed for an archive that was downloaded with a passphrase set.