Creating Backups
Create manual backups of your Supabase projects.
Create backups of your Supabase projects to protect against data loss.
Backup Types
| Type | Includes | Use Case |
|---|---|---|
| full | Database, storage, functions, config | Complete project backup |
| database | PostgreSQL database only | Data backup |
| storage | File storage only | Media files backup |
| functions | Edge functions only | Code backup |
| config | Project configuration | Settings backup |
Create Backup via Web UI
- Navigate to Backups
- Click Create Backup
- Select the project
- Choose backup type
- Select destination (local or cloud)
- Optionally enable encryption
- Click Create Backup
Create Backup via API
curl -X POST https://supascale.example.com/api/v1/backups \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"projectId": "my-project",
"type": "full",
"destination": "local",
"encrypt": false
}'
Response:
{
"success": true,
"backup": {
"id": "backup-123",
"projectId": "my-project",
"type": "full",
"status": "completed",
"path": "/backups/my-project/2026-01-19-full.tar.gz",
"size": 52428800,
"duration": 45,
"createdAt": "2026-01-19T12:00:00Z"
}
}
Backup to Cloud Storage
Store backups in configured cloud storage:
curl -X POST https://supascale.example.com/api/v1/backups \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"projectId": "my-project",
"type": "full",
"destination": "s3"
}'
The backup will be uploaded to your default cloud storage provider.
Encrypted Backups
Enable encryption for sensitive data:
curl -X POST https://supascale.example.com/api/v1/backups \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"projectId": "my-project",
"type": "full",
"destination": "local",
"encrypt": true
}'
Store your encryption password securely. Without it, encrypted backups cannot be restored.
Backup Contents
Full Backup
my-project-2026-01-19-full.tar.gz ├── database/ │ └── database.sql # PostgreSQL dump ├── storage/ │ └── ... # All storage files ├── functions/ │ └── ... # Edge function code ├── config/ │ ├── docker-compose.yml │ └── .env └── metadata.json # Backup metadata
Database Backup
my-project-2026-01-19-database.tar.gz ├── database.sql # PostgreSQL dump └── metadata.json
Storage Backup
my-project-2026-01-19-storage.tar.gz ├── storage/ │ ├── bucket1/ │ └── bucket2/ └── metadata.json
List Backups
Via Web UI
Navigate to Backups to see all backups.
Via API
# All backups curl https://supascale.example.com/api/v1/backups \ -H "X-API-Key: your-api-key" # Filter by project curl "https://supascale.example.com/api/v1/backups?projectId=my-project" \ -H "X-API-Key: your-api-key" # Include statistics curl "https://supascale.example.com/api/v1/backups?stats=true" \ -H "X-API-Key: your-api-key"
Response:
{
"backups": [
{
"id": "backup-123",
"projectId": "my-project",
"type": "full",
"status": "completed",
"size": 52428800,
"createdAt": "2026-01-19T12:00:00Z"
}
],
"pagination": {
"total": 15,
"limit": 50,
"offset": 0
}
}
Download Backup
Via Web UI
- Find the backup
- Click Download
Via API
curl https://supascale.example.com/api/v1/backups/backup-123/download \ -H "X-API-Key: your-api-key" \ -o backup.tar.gz
Delete Backup
Via Web UI
- Find the backup
- Click Delete
- Confirm deletion
Via API
curl -X DELETE https://supascale.example.com/api/v1/backups/backup-123 \ -H "X-API-Key: your-api-key"
Backup Best Practices
Regular Backups
- Production: Daily full backups
- Staging: Weekly full backups
- Development: As needed
Retention Policy
- Keep 7 daily backups
- Keep 4 weekly backups
- Keep 12 monthly backups
Testing Backups
Periodically test restores:
- Restore to a test project
- Verify data integrity
- Document restore time
Off-Site Storage
- Store backups in cloud storage
- Use different region than production
- Enable versioning for additional protection
Troubleshooting
Backup Failed
- Check disk space:
df -h - Verify project is running
- Check Supascale logs
- Ensure database is accessible
Backup Taking Too Long
- Consider partial backups (database only)
- Check disk I/O performance
- Reduce backup during low-traffic periods
Large Backup Size
- Clean up unused storage files
- Use database-only backups more frequently
- Enable compression (default)