Dokumentation

Backup and restore

A backup holds the database, the repositories and the root key, encrypted under your passphrase. Make them on a schedule, keep them off the server, and rehearse a restore on a fresh server.

The installation's root key exists only on its server. It opens every secret the installation stores: model provider keys, git credentials, the identity provider's client secrets. A lost server without a backup loses all of them, and the database they protect.

What a backup holds

One file, encrypted with gpg (AES-256) under the passphrase you made at install:

  • the database;
  • the secrets store, with the root key;
  • the installation's settings;
  • the repositories the agents work on;
  • a list of what is inside, with the installation, the release and a checksum for each part.

Keep the passphrase apart from the backups. Without it, a backup cannot be read, not even by CoNeuroid AB.

When backups are made

  • At install: the first backup, which you copied off the server.
  • Before each upgrade: the updater makes one, in /var/backups/coroid.
  • On your schedule: nothing else makes them. Add a daily backup:
sudo bash /opt/coroid/installation/tools/installer/backup.sh \
  --out "/var/backups/coroid/coroid-$(date -u +%Y%m%dT%H%M%SZ).gpg" \
  --passphrase-file /root/coroid/backup-passphrase

Run it from a systemd timer or cron, and copy each file to storage away from the server: another site, or object storage your company controls. Keep as many as your recovery policy asks for, and delete older ones from the server.

Restore

A restore goes into a new installation: a fresh server, or a new folder with --dir. Prepare the server as for an install (see Server and network), fetch the release (see Install), copy the backup and the passphrase onto the server, and run the installer with --restore:

sudo bash release/one-server/install.sh \
  --release release \
  --installation installation.json \
  --license license.json \
  --passphrase-file /root/coroid/backup-passphrase \
  --restore /root/coroid-acme-production-20261122T101500Z.gpg

The installer reads the backup first and stops if it cannot: a wrong passphrase, a damaged file, or a backup of another installation. Then the secrets come back before anything else, then the database and the repositories. When the release is newer than the backup's, its migrations run. People keep their passwords, so the installer prints no links.

Use the same installation file and license. Point the DNS names at the new server when it is up.

Rehearse it

A restore you never tried is a hope. Before go-live, and then each quarter:

  1. Take the newest backup that left the server.
  2. Restore it on a throwaway server, as above.
  3. Sign in, open a project, and check that a model source still works: that proves the root key came back.
  4. Write down the date, the backup, how long it took and what you found. Then delete the throwaway server.

Next: Diagnostics and support.