Back up PostgreSQL
Back up the Syntho PostgreSQL databases. They store users, workspaces, and platform state.
Use your managed PostgreSQL backups.
Use this when you prefer file-based backups. This works for external PostgreSQL and bundled PostgreSQL. You only need network access to the database. Official documentation pg_dump.
Method 3: Docker volume backup (bundled PostgreSQL)
Use this only when you run the bundled database container. The Docker Compose bundle stores PostgreSQL data in a Docker volume (by default named database-data).
Back up
Find the volume name:
docker volume lsStop the stack to avoid writes:
docker compose downCreate a tarball from the volume:
docker run --rm \ -v <volume-name>:/volume:ro \ -v "$(pwd)":/backup \ alpine \ sh -c 'cd /volume && tar -czf /backup/database-data.tar.gz .'Start the stack:
docker compose up -d
Restore
Stop the stack:
docker compose downRestore into a new or empty volume:
docker run --rm \ -v <volume-name>:/volume \ -v "$(pwd)":/backup \ alpine \ sh -c 'rm -rf /volume/* && tar -xzf /backup/database-data.tar.gz -C /volume'Start the stack:
docker compose up -d
Switch Docker Compose to external PostgreSQL
Optional. Use this when you want Syntho to connect to a PostgreSQL instance outside the cluster.
Bundled service name:
databaseDefault databases:
syntho-core,syntho-backendRoot
.envvariables:DB_USER,DB_PASSWORD
Provision PostgreSQL
Run this SQL as a PostgreSQL admin:
Create databases and user
Make sure Syntho can reach your PostgreSQL host:
PostgreSQL is reachable from the cluster / node network.
Firewall / security groups allow inbound traffic (usually
5432).TLS is enabled if required by your security policy.
Update root .env
Add these variables:
Set credentials to match the role you created:
Remove the bundled database service
Create a production Compose variant (for example docker-compose.external-db.yaml) and:
Remove the
database:service.Remove
depends_on: databasefrom:backendbackend-workercore-apicore-api-worker
Start the external database and verify
Bring up the new configuration and remove orphaned containers:
Verify pods/containers are healthy, UI is accessible, you can log in and workspaces are visible (or can be created).
Last updated
Was this helpful?

