Back up with Docker
If you are running Collabase with the standard Docker Compose setup, the PostgreSQL container is namedcollabase-postgres by default.
Run the following command on your host to export a full database dump:
backup.sql in your current directory. The file contains the full schema and all data.
To include a timestamp in the filename (useful for automated scripts):
Replace
collabase-postgres with your actual container name if you customised the Docker Compose configuration. Replace -U collabase collabase if you changed the PostgreSQL username or database name.Restore from a backup
To restore from a.sql dump file, run:
Automating backups
For production deployments, schedule a daily backup using a cron job on the host server. Example cron entry (runs daily at 02:00, keeps 30 days of backups):/backups directory first and ensure it is owned by the user running the cron job.
Off-server storage
Keeping backups on the same server as Collabase means a disk failure or server compromise could destroy both your data and your backups simultaneously. Always copy backups to at least one remote location. Common options:Amazon S3 or S3-compatible storage (Cloudflare R2, MinIO, etc.)
Amazon S3 or S3-compatible storage (Cloudflare R2, MinIO, etc.)
Use the AWS CLI or
rclone to upload the dump file after generating it. Example with the AWS CLI:Network-attached storage (NAS)
Network-attached storage (NAS)
Mount a NAS share on the host and write backups directly to the mount point. Ensure the mount is available before the cron job runs.
Remote server via rsync or SFTP
Remote server via rsync or SFTP
Generate the dump locally and then transfer it with
rsync or scp to a separate backup server.In-app trash and restore
Collabase also provides an in-app soft-delete and restore mechanism for pages and spaces. Deleted pages move to the trash rather than being permanently removed. Admins can restore or permanently delete trashed items from Settings → Backup.- Deleted pages
- Deleted spaces
Navigate to Settings → Backup → Pages to see all pages in the trash. Click the restore button on any row to move the page back to its original space and location. Click the delete button to permanently remove the page.
In-app trash is separate from database-level backups. It protects against accidental deletions but does not replace regular database backups for disaster recovery.
Recommended backup checklist
| Task | Frequency |
|---|---|
| Database dump | Daily |
| Copy to off-server storage | Daily, immediately after dump |
| Test a restore in a staging environment | Monthly |
| Verify backup file integrity | Weekly |
