Skip to main content

Backups

Automated database backups and storage object versioning to protect your data and enable point-in-time recovery.

Automated Schedules

Daily, weekly, and monthly backups

One-Click Restore

Restore to any backup point instantly

Storage Versioning

Full version history for every object

Encrypted Storage

Backups encrypted at rest in B2

Overview

The Backup service provides automated protection for your data across two layers: database backups using pg_dump and storage object versioning using B2's S3-compatible versioning API.

Backups are stored in a dedicated B2 bucket (sylphx-backups) separate from your app's storage bucket, ensuring backups survive even if you accidentally delete your storage content.

Database Backups

Database backups use pg_dump to create consistent snapshots of your PostgreSQL database. Backups are gzip-compressed and stored in B2.

ScheduleTimeRetentionType
Daily03:00 UTC7 daysAutomatic
WeeklySunday 03:00 UTC30 daysAutomatic
Monthly1st of month90 daysAutomatic
ManualOn demand90 daysUser triggered
Backups are named backups/db/{appId}/{envId}/{timestamp}.sql.gz in B2. The timestamp uses ISO 8601 format.

Manual Backups

Trigger a backup at any time from the console or via the API:

1

Console Backup

Navigate to App → Database → Backups and click Backup Now. The backup will appear in the list within seconds.
2

API/CLI Backup

# Restore a backup via CLI
sylphx backup restore backup_abc123 \
  --env production \
  --confirm

# Or via API
curl -X POST https://api.sylphx.com/v1/backups/backup_abc123/restore \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"targetEnv": "production"}'

Restoring a Backup

Restoring replaces the current database with the backup snapshot. This operation cannot be undone.

Warning: Always create a fresh manual backup before restoring. Any data created after the backup timestamp will be lost.
1

Create a pre-restore backup

Click Backup Now to snapshot the current state before restoring.
2

Select the target backup

In the backups list, click Restore on the backup you want to restore.
3

Confirm the restore

Type your app name to confirm. The restore runs in the background — your app continues serving traffic until the restore completes.

Storage Versioning

Enable versioning on storage buckets to preserve every version of every object. When versioning is enabled, uploads don't overwrite — they create new versions instead.

versioning.ts
import { Sylphx } from '@sylphx/sdk'

const sylphx = new Sylphx({ secretKey: process.env.SYLPHX_SECRET_KEY })

// Enable versioning on a bucket
await sylphx.storage.enableVersioning('my-bucket')

// List versions for a file
const versions = await sylphx.storage.listVersions('my-bucket', 'uploads/document.pdf')
console.log(versions)
// [
//   { versionId: 'v3', lastModified: '2026-02-21', isLatest: true },
//   { versionId: 'v2', lastModified: '2026-02-20' },
//   { versionId: 'v1', lastModified: '2026-02-19' }
// ]

// Restore a previous version
await sylphx.storage.restoreVersion('my-bucket', 'uploads/document.pdf', 'v2')
Versioning storage is billed like normal storage — each version counts toward your storage quota. Use lifecycle policies to automatically clean up old versions.

Pricing

Backup storage is billed at the same rate as regular B2 storage:

  • Backup storage: $0.025/GB/month
  • Restore operations: Free
  • Manual backups: Free (up to 10/day)
  • Retention: Configurable (default: daily 7d, weekly 30d, monthly 90d)