Backup and Restore

Create consistent backups of your Synora database, blobs, and environment configuration, and restore safely.

Creating a Backup

Use installer/backup-and-restore.sh with your active mode (lite or standard):

sudo bash /opt/synora/installer/backup-and-restore.sh backup lite

Or for Standard Mode:

sudo bash /opt/synora/installer/backup-and-restore.sh backup standard

The script performs a clean stop of the compose services so SQLite WAL or CouchDB files are quiescent, packages data and .env into deployment/backups/synora-<mode>-<timestamp>.tar.gz with permissions 0600, and immediately starts the services again.

Protect Backup Archives Backup archives include .env (containing SYNORA_API_KEY and, in Standard Mode, COUCHDB_PASSWORD) alongside database files. Store off-server copies encrypted.

Restoring From a Backup

sudo bash /opt/synora/installer/backup-and-restore.sh restore lite   /opt/synora/deployment/backups/synora-lite-YYYYMMDD-HHMMSS.tar.gz

Before extracting the archive, the restore script:

  1. Stops the running deployment with docker compose down.
  2. Moves any existing data directory into a safety copy at deployment/backups/pre-restore-<mode>-<timestamp>/data.
  3. Extracts the archive, restores 0700 permissions and 1000:1000 ownership on data/api, sets 0600 on .env, and brings the stack back up with docker compose up -d.