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
bash
# 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"
Storage
- Incremental: Only store diffs, not full copies
- Compressed: Typical 10-20% of full DB size
- Included in plan limits
Tier Limits
| Feature | FREE | STARTER | TEAM | BUSINESS |
|---|---|---|---|---|
| Snapshot Count | 3 | 10 | 50 | Unlimited |
| Retention | 7 days | 30 days | 90 days | Custom |
| Auto-snapshot | ✗ | ✓ | Before & after | ✓ |
| Scheduled | ✗ | ✗ | ✓ | ✓ |
| Snapshot Diff | ✗ | ✗ | ✓ | ✓ |
| Export (SQL/S3) | ✗ | ✗ | ✗ | ✓ |