Back to Blog

Database Snapshots: Clone and Restore with Eden

December 4, 2025 · Eden Team

Tags: release


Need a staging environment identical to production? Want point-in-time recovery without managing backup infrastructure? Eden v0.11.0 introduces database snapshots with instant cloning.

How It Works

Create a snapshot of any Eden-managed database:

bash
eden snapshot create --database prod-redis --name "pre-migration-backup"

Clone from the snapshot to create an identical copy:

bash
eden database clone --from-snapshot pre-migration-backup --name staging-redis

Cloning is nearly instant regardless of database size—we use copy-on-write semantics at the storage layer.

Partial Resync for Redis

For Redis databases, Eden now supports the PSYNC protocol for efficient partial resynchronization.

When replicas reconnect after a brief disconnection, they can request just the commands they missed instead of a full data dump. This dramatically reduces resync time for:

  • Network hiccups — Brief disconnections don't require full dumps
  • Rolling restarts — Replicas catch up in seconds instead of minutes
  • Failover recovery — Promoted replicas maintain continuity

Use Cases

Refresh Staging Weekly

bash
# Create snapshot on Sunday night
eden snapshot create --database prod --name "weekly-$(date +%Y%m%d)"

# Clone to staging
eden database clone --from-snapshot "weekly-$(date +%Y%m%d)" --name staging --overwrite

Pre-Migration Safety Net

bash
# Before any risky migration
eden snapshot create --database prod --name "pre-migration-$(date +%s)"

# Run the migration
eden migration run --id my-migration

# If something goes wrong
eden database restore --from-snapshot "pre-migration-..."

Developer Sandboxes

bash
# Each developer gets their own copy
eden database clone --from-snapshot prod-sanitized --name dev-alice
eden database clone --from-snapshot prod-sanitized --name dev-bob

Migration Observability

Every migration now tracks detailed metrics:

| Metric | Description |

|--------|-------------|

| eden_migration_keys_total | Total keys migrated |

| eden_migration_bytes_total | Total bytes transferred |

| eden_migration_errors_total | Errors by category |

| eden_migration_throughput_keys_per_second | Real-time throughput |

All metrics export via Prometheus and OpenTelemetry, integrating with your existing dashboards.

Snapshot and clone guide →