Overview
CockroachDB Cloud offers two types of backups:- Managed Backups: Automated backups managed by Cockroach Labs
- Self-Managed Backups: Manual backups you control and store in your own cloud storage
Managed Backups
All CockroachDB Cloud clusters include automatic managed backups at no additional cost (storage costs apply for some plans).Managed Backup Features
- Automatic scheduling: Backups run automatically based on configured frequency
- Retention management: Old backups are automatically removed based on retention policy
- Secure storage: Backups stored in Cockroach Labs-managed cloud storage
- Point-in-time recovery: Restore to specific timestamps (with revision history)
- Incremental backups: Efficient storage using incremental backup chains
Backup Settings by Plan
- Basic
- Standard
- Advanced
Basic Cluster Backups:
- Frequency: Daily (not configurable)
- Retention: 30 days (not configurable)
- Storage: Included in RU pricing
- Restoration: To same cluster or new cluster
Configure Managed Backups
Adjust Settings
Click Settings and configure:Frequency:
- Daily (default)
- Every 4 hours
- Every 1 hour
- Enter number of days (1-365)
- Default: 30 days
Backup frequency and retention changes apply to new backups. Existing backups follow their original retention schedule.
View Managed Backups
Access backup history and details:Review Backups
The list shows:
- Backup timestamp
- Backup type (full or incremental)
- Size
- Status
- Expiration date
Restore from Managed Backup
Restore your cluster from a managed backup:Choose Restore Target
Select where to restore:
- This cluster: Overwrites current data
- New cluster: Creates new cluster with backup data
Configure Restore
For new cluster restoration:
- Name the new cluster
- Select plan and configuration
- Review cost estimate
Point-in-Time Recovery
Restore to a specific timestamp (requires revision history):Select Timestamp
- Choose Point-in-time
- Enter desired timestamp or use date picker
- Must be within backup’s revision history window
Self-Managed Backups
Take manual backups to your own cloud storage for additional control.Benefits of Self-Managed Backups
- Full control: You manage backup storage and lifecycle
- Custom schedules: Create backup schedules via SQL
- Cloud storage: Use your AWS S3, GCS, or Azure Blob storage
- Encryption: Optional encryption with KMS or passphrase
- Locality-aware: Partition backups by node locality
Set Up Cloud Storage
Configure authentication to your cloud storage:- AWS S3
- Google Cloud Storage
- Azure Blob Storage
Using IAM Role (Recommended):Using Access Keys:
Create Full Backup
Create a complete backup of your data:Create Incremental Backup
Incremental backups save only changes since the last backup:Schedule Automated Backups
Create a backup schedule:@hourly,@daily,@weekly,@monthly- Cron expressions:
0 2 * * *(2 AM daily) FULL BACKUPcadence for full vs incremental
Backup with Revision History
Enable point-in-time recovery:Encrypted Backups
Encrypt backups for additional security:- Passphrase
- AWS KMS
- GCP KMS
Restore from Self-Managed Backup
Restore data from your cloud storage:Restores run as jobs. Monitor progress with
SHOW JOBS.Backup Monitoring
Monitor backup jobs and health:View Backup Jobs
View Backup Details
Monitor in Cloud Console
Track backups in the Cloud Console:- Backup and Restore page: View managed backup history
- Jobs page: Monitor backup job progress
- Metrics page: Backup-related metrics
- Alerts: Configure alerts for backup failures
Backup Best Practices
Retention Policy
Recommended Retention
- Production: 30-90 days
- Compliance: Based on regulatory requirements
- Development: 7-14 days
- Cost vs. Risk: Balance storage costs with recovery needs
Backup Frequency
Frequency Recommendations:- Critical data: Hourly backups
- Production: Daily backups
- Development: Daily or less frequent
- Consider: RPO (Recovery Point Objective) requirements
Testing Restores
Regularly test backup restoration:Multiple Backup Strategies
Implement defense in depth:- Use both managed and self-managed backups
- Store backups in multiple regions
- Keep backups in different cloud providers
- Maintain offline backup copies for critical data
Disaster Recovery
Recovery Point Objective (RPO)
RPO is the maximum acceptable data loss:| Backup Frequency | RPO |
|---|---|
| Hourly | 1 hour |
| Daily | 24 hours |
| Weekly | 7 days |
Recovery Time Objective (RTO)
RTO is the maximum acceptable downtime: Factors Affecting RTO:- Backup size
- Network bandwidth
- Cluster capacity
- Restore complexity
- Small clusters (under 100 GB): 15-30 minutes
- Medium clusters (100GB-1TB): 1-3 hours
- Large clusters (over 1TB): Several hours
DR Planning
Troubleshooting
Backup Failed
Common Causes:- Insufficient storage space
- Authentication failures
- Network connectivity issues
- Concurrent schema changes
- Check error message in job details
- Verify cloud storage credentials
- Ensure adequate storage space
- Retry backup after resolving issues
Restore Failed
Common Causes:- Incompatible CockroachDB versions
- Corrupt backup files
- Insufficient cluster capacity
- Schema conflicts
- Verify backup integrity with
SHOW BACKUP - Check cluster has sufficient capacity
- Review CockroachDB version compatibility
- Contact Support if issues persist
Next Steps
Monitor Backups
Set up backup monitoring and alerts
Cloud Storage
Configure cloud storage authentication
Backup SQL
Learn detailed backup SQL syntax
Disaster Recovery
Plan comprehensive DR strategy