Backup and restore
Matched restore points
Section titled “Matched restore points”Back up PostgreSQL, uploads, deployment configuration/secrets, Caddy certificate state, and custom mounted configuration together. Database-only backups leave media metadata without files.
Pause writes during collection. Use the same Compose project/configuration throughout. Store encrypted backups outside Git with restricted access, including source-encryption keys.
Database example
Section titled “Database example”Substitute your actual database/user. Create the dump inside the container before copying out to avoid PowerShell binary-redirection problems.
docker compose stop api webdocker compose exec -T postgres pg_dump -U postgres -d insightboard -Fc -f /tmp/insightboard.dumpdocker compose cp postgres:/tmp/insightboard.dump ./insightboard.dumpCheck every command. Archive matching uploads/configuration before restarting api/web. These commands cover only the database portion.
Rehearse restoration
Section titled “Rehearse restoration”Use an isolated host/project. Restore matching database, uploads, secrets, configuration, and certificate state. Start the matching app version. Verify health, login, source decryption/refresh, media access, and pairing/playback.
Back up at least daily and before upgrades. Monitor failures and rehearse restoration. Prevent restored tests from connecting to production devices or performing unintended actions on production sources.