Backup Storage
Configure where backups are stored.
Configure local and cloud storage destinations for your backups.
Storage Options
| Destination | Best For | Pros | Cons |
|---|---|---|---|
| Local | Quick access, dev | Fast, no cost | Single point of failure |
| S3 | Production | Durable, scalable | Cost per storage |
| GCS | Google Cloud users | Integrated, durable | Cost per storage |
| Azure | Azure users | Integrated, durable | Cost per storage |
| R2 | Cloudflare users | No egress fees | Newer service |
| MinIO | Self-hosted | Full control | Self-managed |
| Backblaze | Cost-effective | Low cost | Limited features |
Local Storage
Backups stored on the Supascale server.
Default Location
~/.supascale_backups/
├── my-project/
│ ├── 2026-01-19-full.tar.gz
│ └── 2026-01-18-database.tar.gz
└── another-project/
└── 2026-01-19-full.tar.gz
Configure Location
Set in environment variables:
BACKUPS_BASE_DIR=/var/supascale/backups
Considerations
- Fast - No network transfer
- Risk - Server failure loses backups
- Space - Limited by disk size
Recommendation: Use local for quick restores, but always have cloud backups too.
Cloud Storage Setup
See Cloud Storage for detailed provider setup.
Select Destination When Creating Backup
# Local storage
curl -X POST https://supascale.example.com/api/v1/backups \
-d '{"projectId": "my-project", "type": "full", "destination": "local"}'
# S3 storage
curl -X POST https://supascale.example.com/api/v1/backups \
-d '{"projectId": "my-project", "type": "full", "destination": "s3"}'
Default Storage Provider
Set a default provider in Cloud Storage settings. Backups use the default when destination not specified.
Hybrid Strategy
Combine local and cloud storage:
Recommended Setup
[
{
"name": "Hourly Database Backup (Local)",
"cronExpression": "0 * * * *",
"backupConfig": {
"type": "database",
"destination": "local"
}
},
{
"name": "Daily Full Backup (S3)",
"cronExpression": "0 2 * * *",
"backupConfig": {
"type": "full",
"destination": "s3"
}
}
]
Benefits
- Local: Fast hourly restores
- Cloud: Disaster recovery protection
Storage Management
Check Storage Usage
Local Storage
# Check backup directory size du -sh ~/.supascale_backups/*
Via API
curl "https://supascale.example.com/api/v1/backups?stats=true" \ -H "X-API-Key: your-api-key"
Response includes storage stats:
{
"stats": {
"totalBackups": 45,
"totalSize": 15728640000,
"byDestination": {
"local": { "count": 30, "size": 5242880000 },
"s3": { "count": 15, "size": 10485760000 }
}
}
}
Cleanup Old Backups
Delete backups to free space:
# Delete specific backup curl -X DELETE https://supascale.example.com/api/v1/backups/backup-123 \ -H "X-API-Key: your-api-key"
Retention Best Practices
| Period | Local | Cloud |
|---|---|---|
| Hourly | 24 hours | - |
| Daily | 7 days | 30 days |
| Weekly | - | 12 weeks |
| Monthly | - | 12 months |
Cost Estimation
AWS S3 (Standard)
| Storage | Est. Monthly Cost |
|---|---|
| 10 GB | ~$0.23 |
| 100 GB | ~$2.30 |
| 1 TB | ~$23.00 |
Plus data transfer costs for restores.
Google Cloud Storage (Standard)
| Storage | Est. Monthly Cost |
|---|---|
| 10 GB | ~$0.26 |
| 100 GB | ~$2.60 |
| 1 TB | ~$26.00 |
Cloudflare R2
| Storage | Est. Monthly Cost |
|---|---|
| 10 GB | Free (10GB included) |
| 100 GB | ~$1.35 |
| 1 TB | ~$15.00 |
No egress fees!
Backblaze B2
| Storage | Est. Monthly Cost |
|---|---|
| 10 GB | Free (10GB included) |
| 100 GB | ~$0.50 |
| 1 TB | ~$5.00 |
Security
Encryption at Rest
- Local: Enable disk encryption
- S3: Enable SSE-S3 or SSE-KMS
- GCS: Enabled by default
- Azure: Enabled by default
Encryption in Transit
All cloud providers use TLS for transfer.
Backup Encryption
Enable Supascale backup encryption:
{
"encrypt": true
}
This encrypts backup contents before upload, providing additional security layer.
Access Control
- S3: Use IAM policies
- GCS: Use IAM roles
- Azure: Use RBAC
Minimum required permissions:
PutObject- Upload backupsGetObject- Download for restoreDeleteObject- Remove old backupsListBucket- List backups
Troubleshooting
"Upload failed"
- Check cloud credentials are valid
- Verify bucket/container exists
- Check permissions
- Test connection in Cloud Storage settings
"Insufficient space"
- Delete old local backups
- Increase disk size
- Use cloud storage instead
- Reduce backup frequency
"Download failed"
- Verify backup exists
- Check cloud provider status
- Test cloud connection
- Check network connectivity