Automated Backups
Daily automated backups for all cloud databases.
Overview
Postbase automatically backs up all cloud databases:
- Schedule: Daily at 3:00 AM UTC
- Format: pg_dump custom format
- Compression: gzip
- Storage: Cloudflare R2 (zero egress fees)
Retention Policy
| Tier | Retention | Storage |
|---|---|---|
| Free | 3 days | 10 GB |
| Pro | 30 days | 100 GB |
Old backups are automatically deleted after the retention period.
Viewing Backups
CLI
postbase cloud backups list -p myapp -d productionOutput:
Backups for production
ID TYPE STATUS SIZE CREATED EXPIRES
bkp_D3uqtMIZ... automated completed 12.5 MB 2026-01-25 03:00:00 2026-01-28
bkp_K9Rvw2Hx... automated completed 12.3 MB 2026-01-24 03:00:00 2026-01-27
bkp_P7nFqLmA... automated completed 12.1 MB 2026-01-23 03:00:00 2026-01-26
Total: 3 automated backupsAPI
curl -H "Authorization: Bearer $TOKEN" \
https://api.postbase.sh/projects/myapp/databases/production/backupsBackup Contents
Each backup includes:
- Schema: All tables, indexes, constraints, views, functions
- Data: All table rows
- Permissions: GRANT statements
- Extensions: Enabled extensions
Not included:
- Connection settings
- Runtime configuration
- Active connections
- Temporary tables
Backup Storage
Backups are stored in Cloudflare R2:
postbase-backups/
├── proj_xxx/
│ ├── db_production/
│ │ ├── bkp_D3uqtMIZ.dump.gz
│ │ ├── bkp_K9Rvw2Hx.dump.gz
│ │ └── bkp_P7nFqLmA.dump.gz
│ └── db_staging/
│ └── bkp_Abc123.dump.gzMonitoring Backups
Check Recent Backups
# List last 7 days
postbase cloud backups list -p myapp -d production --days 7Verify Backup Completed
# Check specific backup
postbase cloud backups info bkp_D3uqtMIZ -p myapp -d productionOutput:
Backup Details
ID: bkp_D3uqtMIZXOoU_WPo2gbi3_xu
Type: automated
Status: completed
Size: 12.5 MB
Database: production
Created: 2026-01-25 03:00:00 UTC
Expires: 2026-01-28 03:00:00 UTC
Duration: 45 secondsBackup Notifications
Webhook (Coming Soon)
Configure webhooks for backup events:
{
"event": "backup.completed",
"backup_id": "bkp_D3uqtMIZ...",
"database": "production",
"status": "completed",
"size_bytes": 13107200,
"timestamp": "2026-01-25T03:00:45Z"
}Email Alerts (Coming Soon)
Receive email notifications for:
- Backup failures
- Storage quota warnings
- Retention expiration
Backup Performance
Typical Backup Times
| Database Size | Backup Time |
|---|---|
| < 1 GB | < 1 minute |
| 1-10 GB | 1-5 minutes |
| 10-50 GB | 5-15 minutes |
| > 50 GB | Contact support |
Impact on Database
Automated backups use:
pg_dumpwith custom format- Minimal locking (consistent snapshot)
- Background priority
Impact:
- Negligible for most workloads
- May increase I/O during backup
- No locks on tables (MVCC snapshot)
Restoring from Backup
Via CLI
# Restore to same database
postbase cloud backups restore bkp_D3uqtMIZ \
-p myapp -d production --force
# Restore to different database
postbase cloud backups restore bkp_D3uqtMIZ \
-p myapp -d production-restoredWhat Restore Does
- Downloads backup from R2
- Stops active connections (if
--force) - Drops existing data
- Runs pg_restore
- Rebuilds indexes
- Restores permissions
Restore Duration
| Backup Size | Restore Time |
|---|---|
| < 1 GB | < 2 minutes |
| 1-10 GB | 2-10 minutes |
| 10-50 GB | 10-30 minutes |
Downloading Backups
Download via CLI
postbase cloud backups download bkp_D3uqtMIZ \
-p myapp -d production \
-o ./backup-2026-01-25.dumpDownload via API
# Get download URL
curl -H "Authorization: Bearer $TOKEN" \
https://api.postbase.sh/projects/myapp/databases/production/backups/bkp_D3uqtMIZ/downloadResponse:
{
"download_url": "https://r2.postbase.sh/...",
"expires_at": "2026-01-25T04:00:00Z"
}Local Restore
Restore downloaded backup locally:
# Decompress
gunzip backup-2026-01-25.dump.gz
# Restore
pg_restore -d myapp backup-2026-01-25.dumpTroubleshooting
Backup Failed
If automated backup fails:
- Check database is running
- Check storage quota
- Check backup service health
postbase cloud pitr service-status -p myapp -d productionLarge Database Timeout
For databases >50GB, contact support for:
- Extended timeout
- Dedicated backup window
- Parallel backup configuration
Missing Backup
If expected backup is missing:
- Check backup ran (may be delayed)
- Check retention (may have expired)
- Check manual deletion
# Check all backups including deleted
postbase cloud backups list -p myapp -d production --include-deleted