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:
- Stops the running deployment with
docker compose down. - Moves any existing
datadirectory into a safety copy atdeployment/backups/pre-restore-<mode>-<timestamp>/data. - Extracts the archive, restores
0700permissions and1000:1000ownership ondata/api, sets0600on.env, and brings the stack back up withdocker compose up -d.