TestingOpsDocumentation

Backup and restore (Docker)

What to back up and how to restore it

Four things belong together and are backed up together by ./backup.sh:

Part Where Why
Database dump db.dump (pg_dump custom format) Cases, runs, defects, users, knowledge
Application data app-data.tgz = TESTINGOPS_DATA_DIR/app Uploads, run evidence, secrets master key
Configuration config.tgz = .env, env.list, caddy/, license/ Reinstall without re-entering settings
Checksums checksums.txt Verified by restore.sh

Without the master key the integration secrets (tokens, API keys) in the database cannot be decrypted; without the database the evidence files are orphans.

./backup.sh                                   # → ./backups/testingops-<UTC stamp>/
TESTINGOPS_BACKUP_DIR=/mnt/backup ./backup.sh # elsewhere

Suggested schedule: daily cron, weekly copy to another machine. A backup that has never been restored is not a backup — run the restore once a quarter on a test server.

Restore

./restore.sh backups/testingops-20261002T120000Z

Stops the application, verifies checksums, restores the database (pg_restore --clean), replaces TESTINGOPS_DATA_DIR/app (the old directory is kept as app.old until you delete it) and starts everything again. For an external database the script prints the pg_restore command to run on your server and waits.

Moving to another server

Install the same version on the new server with the kit (./install.sh), copy the backup directory over, run ./restore.sh, then update DNS. The license file is tied to the installation, not to the hardware.