Backups & Recovery Overview
Comprehensive data protection with automated backups and point-in-time recovery.
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ Data Protection │
├─────────────────────────────────────────────────────────────────┤
│ │
│ PostgreSQL Backup Service R2 │
│ (Railway) (Railway) (Cloudflare) │
│ │
│ ┌─────────┐ ┌─────────────┐ ┌──────────┐│
│ │ Primary │──pg_dump─────▶│ │───────▶│ Backups ││
│ │ Database│ │ Backup │ │ /*.dump ││
│ │ │ │ Service │ └──────────┘│
│ │ │ │ │ │
│ │ │──pg_receivewal│ │ ┌──────────┐│
│ │ │───────────────▶ │───────▶│ WAL ││
│ └─────────┘ └─────────────┘ │ Archives ││
│ └──────────┘│
│ │
│ Recovery Options: │
│ • Full restore from daily backup │
│ • PITR to any second within retention window │
│ • Latest recovery (most recent state) │
│ │
└─────────────────────────────────────────────────────────────────┘Backup Types
Automated Backups
| Feature | Description |
|---|---|
| Schedule | Daily at 3 AM UTC |
| Format | pg_dump custom format |
| Compression | gzip |
| Retention | 3 days (free) / 30 days (pro) |
| Storage | Cloudflare R2 |
Manual Backups
| Feature | Description |
|---|---|
| Trigger | On-demand via CLI/API |
| Format | pg_dump custom format |
| Limit | 1 per database (free) / Unlimited (pro) |
| Retention | 7 days (free) / 90 days (pro) |
WAL Archives (PITR)
| Feature | Description |
|---|---|
| Method | Continuous streaming via pg_receivewal |
| Granularity | Per-transaction |
| Retention | 1 day (free) / 7 days (pro) |
| Recovery | Any point in time |
Quick Start
List Backups
postbase cloud backups list -d productionCreate Manual Backup
postbase cloud backups create -d productionRestore from Backup
postbase cloud backups restore bkp_xxx -d productionEnable PITR
postbase cloud pitr enable -d productionRestore to Point in Time
postbase cloud pitr restore \
-d production \
--target-time "2026-01-25T14:30:00Z"Storage & Costs
Cloudflare R2
- Zero egress fees - No charge for downloads
- S3-compatible - Standard API
- Global availability - Edge caching
Storage Pricing
| Tier | Storage | Price |
|---|---|---|
| Free | 10 GB | $0 |
| Pro | 100 GB | Included |
| Extra | Per GB | $0.015/GB/mo |
Recovery Time Objectives
| Recovery Type | RTO | RPO |
|---|---|---|
| Full Restore | ~5 min | 24 hours |
| PITR | ~10 min | < 1 second |
| Latest | ~10 min | Real-time |
Best Practices
Testing Restores
Regularly test your backup restoration:
# Create a test database
postbase cloud provision test-restore
# Restore backup to test
postbase cloud backups restore bkp_xxx -d test-restore
# Verify data
postbase cloud url test-restore
# Cleanup
postbase cloud destroy test-restorePre-Deployment Backups
Create a backup before major deployments:
# Create backup
postbase cloud backups create -d production
# Deploy changes
npm run deploy
# If issues, restore
postbase cloud backups restore bkp_xxx -d productionPITR for Critical Data
Enable PITR for production databases:
# Enable PITR
postbase cloud pitr enable -d production
# Check status
postbase cloud pitr status -d productionMonitoring
Backup Status
postbase cloud backups list -d production --jsonPITR Status
postbase cloud pitr status -d productionWAL Receiver Health
postbase cloud pitr receiver -d productionNext Steps
- Automated Backups - Daily backup configuration
- Manual Backups - On-demand backups
- Restore Operations - Recovery procedures
- Point-in-Time Recovery - PITR setup and usage