Backups

Edition: COMMUNITYCommunity PROPro ENTERPRISEEnterprise

What it does

A cinqstack backup is one encrypted file with everything needed to restore the install, on the same server or a new one:

The database part does not depend on the database engine, so a backup made on SQLite restores onto PostgreSQL, and the other way round.

Caches and Relay transfers are not included. They are rebuilt or sent again.

The file is encrypted with AES-256-GCM, using a key made from your passphrase. cinqstack can detect a wrong passphrase, a damaged file and a file that was cut short or tampered with. Backups are named cinqstack-YYYYMMDD-HHMMSS.cqb (the time is UTC).

You can make backups three ways: on a daily schedule, with Create backup in the web interface, or with cinqstack backup create on the command line. Restoring is done on the command line only, with cinqstack stopped.

What it needs in NetBox

Nothing in NetBox. NetBox has its own database and needs its own backups; cinqstack's backup covers cinqstack only.

Setting up

Open Settings › Backup (admins only).

Choose a passphrase

The passphrase must be at least 12 characters. Write it down somewhere safe, away from the server. A backup cannot be opened without its passphrase, and nobody can recover it for you.

Daily backups

Under Schedule:

FieldDefaultWhat it does
Back up every dayoffTurns the daily backup on. It needs a saved passphrase: without one, the page says Scheduled backups need a passphrase. and leaves it off.
After (hour, UTC)2The backup runs once a day, at the first check after this hour (UTC). cinqstack checks every 10 minutes.
Keep the last14How many backups to keep in the server's backup folder (1 to 365). Older ones are deleted after each scheduled backup.
Also copy each backup toblankA folder for a second copy, for example a mounted share or another disk: /mnt/backups/cinqstack. Blank means no copy.
Passphrase and AgainThe passphrase for scheduled backups. It is stored encrypted with the install's own key. Leave both blank to keep the saved one.

Choose Save schedule. The page confirms with Backup settings saved. Keep the passphrase somewhere safe: without it a backup cannot be restored. After the first scheduled backup, the page shows Last scheduled backup: with its date.

On Docker, the copy folder must be a path inside the container, so mount the share or disk into the web and worker containers first.

Back up now

Under Back up now, enter a passphrase (or leave it blank to use the saved one) and choose Create backup. The page says Backup cinqstack-….cqb created (… KiB). Take one before every upgrade.

On the command line

cinqstack backup create [file]          # with no file: writes <data>/backups/cinqstack-YYYYMMDD-HHMMSS.cqb and prints its full path
cinqstack backup inspect <file>         # checks the passphrase and every checksum; changes nothing
cinqstack backup restore <file> --yes   # replaces all data in this install; stop the server and worker first

Each command asks for the passphrase. For scripts, put it in an environment variable and pass its name with --passphrase-env, for example --passphrase-env BACKUP_PASSPHRASE.

Reading the results

The backup schedule filled in, with three backups in the list.
The backup schedule filled in, with three backups in the list.

Backups on this server shows the folder they are kept in (backups in the data folder) and lists each backup with its File, Size and Created time. Click a file name to download it. Delete removes it from the server (not from the copy folder).

To check a backup without changing anything:

cinqstack backup inspect cinqstack-20261104-020000.cqb

If the passphrase is right and every part matches its checksum, it prints the cinqstack version, the creation time, the schema, the number of rows and tables and files, and All checksums match.

Every backup created, deleted or reconfigured is recorded in Settings › Audit log.

Restoring

Restoring replaces everything in this install with the backup:

  1. Stop cinqstack (the web server and the worker).
  2. Run cinqstack backup inspect <file> to check the file and the passphrase.
  3. Run cinqstack backup restore <file> --yes. On Docker: docker compose run --rm -v $PWD:/restore web cinqstack backup restore /restore/<file> --yes.
  4. Start cinqstack again.

Restore checks the passphrase and every checksum before it changes anything. It then empties the database, loads the backup's rows, brings the database up to the current version and writes the backup's files into the data folder.

Messages you may see

MessageWhat it means
Use a passphrase of at least 12 characters.The passphrase is too short.
Give a passphrase (or save one in the settings).Create backup was chosen with no passphrase entered and none saved.
The passphrases do not match.Passphrase and Again differ.
This is not a cinqstack backup.The file is something else.
Wrong passphrase, or the backup was altered.The passphrase is wrong, or the file was changed.
The backup is truncated.The file was cut short, for example by an incomplete copy.
The backup has data after its end. / The backup content is damaged. / … does not match its checksum.The file is damaged. Use another backup.
This backup was made by a newer cinqstack (schema …); upgrade this install first.Upgrade this install to at least the version that made the backup, then restore.
Restore replaces all data in this install. Stop the server and worker, then add --yes.Restore was run without --yes.

Findings it raises

None in the Findings inbox. A scheduled backup that fails sends the notification "Scheduled backup failed" (severity critical), and a failed copy sends "Backup copy failed" (warning), both under the event "A sync or analysis run failed". See Notifications. A manual backup sends no notification at all; it is recorded only in the audit log, and a failed Create backup shows its error on the page.

Limits