BlogFeatureInstant Cache Cloning: Spin Up Test Environments in Seconds

Instant Cache Cloning: Spin Up Test Environments in Seconds

Adrian Silaghi
Adrian Silaghi
January 20, 2026
6 min read
39 views
#cache #redis #valkey #dragonfly #cloning #snapshots #testing #disaster-recovery

We are excited to announce a powerful new feature: instant cache cloning. Now you can create exact copies of your Redis, Valkey, or Dragonfly cache instances from any snapshot with just one click.

Why Clone Your Cache?

Cache cloning opens up powerful workflows for development teams:

  • Test Environments: Spin up a production-like cache with real data for testing new features without affecting your live systems.
  • Staging Deployments: Create staging environments that mirror production for accurate pre-release validation.
  • Disaster Recovery: Quickly restore from offsite backups if something goes wrong.
  • Data Analysis: Clone your cache to run analytics or debugging without impacting production performance.

Two Cloning Methods

DanubeData supports two cloning sources to fit different scenarios:

Local VolumeSnapshot (Fast)

Clone from local NVMe snapshots for maximum speed. This method uses TopoLVM CSI snapshots that complete in seconds, making it ideal for development and testing workflows where you need a cache copy quickly.

Best for:

  • Daily development workflows
  • Quick test environment creation
  • Debugging production issues safely

Velero Backup (Offsite)

Clone from offsite S3 backups for disaster recovery scenarios. Your data is safely stored in a separate location and can be restored even if the primary datacenter is unavailable.

Best for:

  • Disaster recovery testing
  • Cross-datacenter restoration
  • Compliance requirements for offsite backups

How It Works

The cloning process is straightforward:

  1. Navigate to your cache instance's snapshots page
  2. Select a snapshot and click "Clone"
  3. Choose a name for the new instance (must be DNS-compatible)
  4. Select your clone source: local snapshot or offsite backup
  5. Click "Create Clone" and your new cache instance is provisioned automatically

Behind the Scenes

When you clone from a local VolumeSnapshot:

1. New CacheInstance record created with Pending status
2. StatefulSet deployed via GitOps
3. Empty PVC created, then replaced with snapshot-based PVC
4. Pod starts with cloned data
5. Instance marked as Running

When you clone from a Velero backup:

1. Velero restore creates PVC from offsite backup
2. Temporary VolumeSnapshot created from restored PVC
3. Standard local clone flow continues
4. Temporary resources cleaned up automatically

Inherited Configuration

Cloned instances inherit all settings from the source instance at the time of the snapshot:

  • Cache Provider: Redis, Valkey, or Dragonfly
  • Version: Same version as source
  • Memory Size: Same memory allocation
  • CPU Cores: Same CPU configuration
  • Parameter Groups: Custom configurations preserved
  • Datacenter: Same location as source

This ensures your test environment behaves exactly like production.

API Support

Clone cache instances programmatically via our API:

POST /api/v1/snapshots/cache/{snapshotId}/clone

{
    "name": "my-test-cache",
    "source_type": "volume_snapshot"
}

Response:
{
    "message": "Cache clone initiated",
    "instance": {
        "id": "abc123",
        "name": "my-test-cache",
        "status": "pending",
        "clone_status": "pending"
    }
}

The source_type parameter accepts:

  • volume_snapshot - Fast local clone
  • velero_backup - Clone from offsite backup

Use Cases in Practice

CI/CD Pipeline Integration

Spin up fresh cache clones for each test run:

# GitHub Actions example
- name: Create test cache
  run: |
    curl -X POST "https://api.danubedata.com/api/v1/snapshots/cache/$SNAPSHOT_ID/clone" 
      -H "Authorization: Bearer $API_TOKEN" 
      -d '{"name": "test-cache-${{ github.run_id }}", "source_type": "volume_snapshot"}'

Developer Environments

Give each developer their own cache instance with production-like data:

# Create developer-specific cache
curl -X POST ".../clone" -d '{"name": "cache-dev-john", "source_type": "volume_snapshot"}'

# Developer connects to their isolated instance
REDIS_HOST=valkey-cache-dev-john.tenant-123.danubedata.ro

Billing

Cloned instances are billed at the same rate as the source instance's plan. You only pay for the time the cloned instance exists - delete it when your tests are complete to stop billing.

Get Started Today

Cache cloning is available now for all cache instances. Create a snapshot of your cache and try cloning it to see how easy it is to spin up test environments.

View your cache instances or sign up to get started.

Questions about cache cloning? Contact our team for help.

Share this article

Ready to Get Started?

Deploy your infrastructure in minutes with DanubeData's managed services.