Skip to content

Single server

Backups and restore

Encrypted backups every night, tested every week. First on your disk and your own server, a paid provider only if you want one.

What is backed up

Each backup is a folder backups/voaaro-YYYYMMDDTHHMMSSZ/:

FileContents
voaaro.dump.gpgproduct database (accounts, API keys, sending logs, settings…)
postgres.dump.gpgmail engine database (folders, search index…)
blobs.tar.gpgmessage contents and attachments stored on disk
MANIFESTdates, versions, SHA-256 fingerprints of each file

Everything is encrypted (AES-256, symmetric gpg) with the deploy/compose/backup.key key, as it is written: nothing is written in clear text to disk.

Not included in the backup: the .env file and backup.key (keep them off the server, see Installation), the certificate (it can be obtained again), the Valkey cache (no data to keep) and the antivirus signatures (downloaded again). Mail stored in an S3 bucket (Storage) is not copied: its durability is that of the bucket.

Schedule and rotation

Set in Administration › Health › Backups:

  • a backup every night (02:30 UTC by default); the agent makes one on its own if the last one is more than 30 hours old;
  • rotation of 7 daily, 4 weekly, 6 monthly by default, on disk as in the bucket;
  • a restore test every week (Sunday by default): the latest backup is restored into a disposable stack, with no Internet access, verified, then destroyed. Safe for production.

Manual backup or test:

Shell
sudo voaaro backup
sudo voaaro restore-test

Where to keep copies: your hardware first

A backup that stays on the server does not protect against a server failure. Keep at least one copy elsewhere, in order of preference:

1. The local disk (always on)

Backups are written to /srv/voaaro/backups (VOAARO_BACKUP_DIR for another folder, for example a second mounted disk). Essential, but not enough on its own.

2. A server of your own, free: MinIO

Voaaro's off-server copy speaks the S3 protocol. The simplest free option is to install MinIO (free software) on another machine of yours: a second VPS, a NAS, an office server. In Health › Backups › Off-server copy, choose the MinIO preset, enter the address, the bucket (dedicated to backups), the key and the secret, then Test. Each new backup is sent there in 32 MB chunks, the MANIFEST last.

3. Your own SFTP or rsync server

Voaaro does not send over SFTP itself. If you already have a backup server reachable over SSH, copy the folder from the host with your usual tools, for example a cron line:

Shell
# every morning, copy the encrypted backups to your server (dedicated SSH key)
30 5 * * * rsync -a --delete /srv/voaaro/backups/ backup@nas.example.com:voaaro/

The files are already encrypted: the destination server cannot read them.

4. As a fallback, paid storage

Without a second machine, the same S3 copy works with a provider: presets Cloudflare R2, AWS S3, Backblaze B2, Scaleway, or other (any S3-compatible service). Preferably choose a provider in another country or region than your server.

Restore

On the same server, from a backup folder:

Shell
cd /srv/voaaro
sudo scripts/restore.sh backups/voaaro-20261112T023000Z --yes

Before touching anything, the script checks the fingerprints, that each file decrypts, that the engine version is the same and that PostgreSQL is at least as recent. It restores alongside (temporary databases and folders), then swaps them with the live data, with the engine stopped: a failure before the swap leaves production intact.

From the bucket: download the four files of voaaro-backups/voaaro-<date>/ into backups/, then run the same command.

On a new server

What you absolutely must have kept off the old server:

  • the same VOAARO_SECRET_KEY (without it, two-factor authentication, storage secrets and the saved license key cannot be read back);
  • the backup.key key (without it, the backup is unreadable);
  • a complete backup (its four files).
  1. Release the license (on the old instance if it still answers, Administration › License › Remove the key, otherwise from your customer area): the installer needs it on the new server.
  2. Install on the new server the same version as the backup (--version X.Y.Z).
  3. Put back the two secrets: the VOAARO_SECRET_KEY line of deploy/compose/.env and the deploy/compose/backup.key file (permissions 600).
  4. Copy the backup into backups/, run scripts/restore.sh, then restart the service so that it reads the key again: cd /srv/voaaro/deploy/compose && sudo docker compose up -d --force-recreate web.
  5. Check the license in Administration › License (activate the key there if needed), then point the A record and the reverse DNS to the new address.
Esc