Data Snapshots & Rollback
Lightweight snapshots with instant rollback. Reset your database to a known state in seconds.
The Problem
After test runs or experiments, resetting the database to a known state is painful and slow.
The Solution
Point-in-time snapshots that restore in seconds, not hours.
Timeline View:
──●────────●────────●────────●────────●──▶ time
│ │ │ │ │
Sync Sprint Sprint Sprint Current
#1 End #1 End #2 End #3
Any snapshot can be restored in seconds.Features
- Auto-snapshot after each sync job
- Manual snapshot creation (one-click)
- Scheduled snapshots (every sprint end)
- Named snapshots ("before-migration", "clean-state")
- Instant rollback to any snapshot
- Snapshot diff (compare what changed)
- Retention policies (keep last N, expire after X days)
Use Cases
Post-Test Reset
Run E2E tests → DB is dirty → Rollback → Clean state
Sprint-Based Refresh
Every 2 weeks: Auto-snapshot → Fresh sync from prod Problem during sprint? → Rollback to sprint start
Debugging Historical Issues
"This bug wasn't there last week" → Restore last week's snapshot → Reproduce → Compare
Safe Experimentation
Create snapshot → Try risky changes → Rollback if bad
CLI & API
# CLI Commands
$ phony snapshot create --name "pre-migration"
$ phony snapshot list
$ phony snapshot restore snap_abc123
$ phony snapshot diff snap_abc123 snap_def456
# API
POST /api/v1/projects/{id}/snapshots
GET /api/v1/projects/{id}/snapshots
POST /api/v1/snapshots/{id}/restore
GET /api/v1/snapshots/{id}/diff/{other_id}Scheduling (Team+)
- Every sync: Auto-snapshot before & after
- Cron:
0 0 * * FRI(every Friday midnight) - Sprint-based: Integrate with Jira/Linear
- Retention: "Keep last 10" or "Expire after 30 days"
How It Runs
Snapshots are captured and restored by the phony agent in your infrastructure, and stored in your storage — local disk or your own S3/GCS bucket, encrypted with keys you control. Phony Cloud keeps only the catalog: snapshot ids, schema hashes, sizes, and lineage, which powers scheduling, retention policies, and point-in-time restore. Snapshot contents never leave your network. Details: Snapshots Architecture.
Storage
- Your storage: snapshots live on local disk or your own S3/GCS bucket; the cloud tracks metadata only
- Incremental: Only store diffs, not full copies
- Compressed: Typical 10-20% of full DB size
Tier Limits
Environments spawned from snapshots (CI runs, agent sandboxes, ephemeral databases) are unlimited at every tier — only tracked snapshots are tiered.
| Feature | FREE | STARTER | TEAM | BUSINESS |
|---|---|---|---|---|
| Tracked Snapshots | 3 | 10 | 50 | Unlimited |
| Incremental Snapshots | ✗ | ✓ | ✓ | ✓ |
| Auto-snapshot | ✗ | ✓ | Before & after | ✓ |
| Scheduled | ✗ | ✗ | ✓ | ✓ |
| Snapshot Diff | ✗ | ✗ | ✓ | ✓ |
| Point-in-Time Restore | ✗ | ✗ | ✗ | ✓ |
| Retention Policy Rules | ✗ | ✗ | ✗ | ✓ |