Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

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

FeatureDescription
ScheduleDaily at 3 AM UTC
Formatpg_dump custom format
Compressiongzip
Retention3 days (free) / 30 days (pro)
StorageCloudflare R2

Manual Backups

FeatureDescription
TriggerOn-demand via CLI/API
Formatpg_dump custom format
Limit1 per database (free) / Unlimited (pro)
Retention7 days (free) / 90 days (pro)

WAL Archives (PITR)

FeatureDescription
MethodContinuous streaming via pg_receivewal
GranularityPer-transaction
Retention1 day (free) / 7 days (pro)
RecoveryAny point in time

Quick Start

List Backups

postbase cloud backups list -d production

Create Manual Backup

postbase cloud backups create -d production

Restore from Backup

postbase cloud backups restore bkp_xxx -d production

Enable PITR

postbase cloud pitr enable -d production

Restore 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

TierStoragePrice
Free10 GB$0
Pro100 GBIncluded
ExtraPer GB$0.015/GB/mo

Recovery Time Objectives

Recovery TypeRTORPO
Full Restore~5 min24 hours
PITR~10 min< 1 second
Latest~10 minReal-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-restore

Pre-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 production

PITR for Critical Data

Enable PITR for production databases:

# Enable PITR
postbase cloud pitr enable -d production
 
# Check status
postbase cloud pitr status -d production

Monitoring

Backup Status

postbase cloud backups list -d production --json

PITR Status

postbase cloud pitr status -d production

WAL Receiver Health

postbase cloud pitr receiver -d production

Next Steps