Backup Storage

Configure where backups are stored.

Configure local and cloud storage destinations for your backups.

Storage Options

DestinationBest ForProsCons
LocalQuick access, devFast, no costSingle point of failure
S3ProductionDurable, scalableCost per storage
GCSGoogle Cloud usersIntegrated, durableCost per storage
AzureAzure usersIntegrated, durableCost per storage
R2Cloudflare usersNo egress feesNewer service
MinIOSelf-hostedFull controlSelf-managed
BackblazeCost-effectiveLow costLimited 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:

[
  {
    "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

PeriodLocalCloud
Hourly24 hours-
Daily7 days30 days
Weekly-12 weeks
Monthly-12 months

Cost Estimation

AWS S3 (Standard)

StorageEst. Monthly Cost
10 GB~$0.23
100 GB~$2.30
1 TB~$23.00

Plus data transfer costs for restores.

Google Cloud Storage (Standard)

StorageEst. Monthly Cost
10 GB~$0.26
100 GB~$2.60
1 TB~$26.00

Cloudflare R2

StorageEst. Monthly Cost
10 GBFree (10GB included)
100 GB~$1.35
1 TB~$15.00

No egress fees!

Backblaze B2

StorageEst. Monthly Cost
10 GBFree (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 backups
  • GetObject - Download for restore
  • DeleteObject - Remove old backups
  • ListBucket - List backups

Troubleshooting

"Upload failed"

  1. Check cloud credentials are valid
  2. Verify bucket/container exists
  3. Check permissions
  4. Test connection in Cloud Storage settings

"Insufficient space"

  1. Delete old local backups
  2. Increase disk size
  3. Use cloud storage instead
  4. Reduce backup frequency

"Download failed"

  1. Verify backup exists
  2. Check cloud provider status
  3. Test cloud connection
  4. Check network connectivity