Storage Snapshots

Snapshots provide point-in-time copies of your block storage volumes. They are incremental, meaning only changed blocks are stored after the initial snapshot, optimizing storage costs and creation speed. Snapshots can be used to restore data, create new volumes, or migrate workloads across regions.

💡 Pro Tip
Snapshots are block-level copies and do not include filesystem metadata. For consistent database snapshots, run fsfreeze or shut down the application before creating the snapshot.

Prerequisites

Creating a Snapshot

Using the CLI

bash
cx snapshot create --volume-id vol-8f3a2b9c --name "daily-prod-2025-05-20" --tags env:prod,team:backend

Using the API

HTTP POST /v2/snapshots
{
  "volume_id": "vol-8f3a2b9c",
  "name": "daily-prod-2025-05-20",
  "tags": ["env:prod", "team:backend"],
  "description": "Automated nightly snapshot",
  "region": "us-east-1"
}
Parameter Type Required Description
volume_id string Yes UUID of the source volume
name string No Human-readable name (max 64 chars)
tags array No Key-value pairs for filtering
region string No Target region (defaults to volume region)

Managing Snapshots

List Snapshots

bash
cx snapshot list --volume-id vol-8f3a2b9c --sort created_at

Restore from Snapshot

⚠️ Warning
Restoring overwrites the existing volume data. Ensure the volume is unmounted from any running instance before restoring.
bash
cx volume restore --volume-id vol-8f3a2b9c --snapshot-id snap-7d4e1a2f

Delete a Snapshot

bash
cx snapshot delete --snapshot-id snap-7d4e1a2f --force

Best Practices

FAQ

Can I take a snapshot of a mounted volume?

Yes. However, active I/O during snapshot creation may cause temporary consistency gaps. For production databases, we recommend unmounting the volume or using fsfreeze for consistent block-level backups.

How are snapshot costs calculated?

The first snapshot stores a full copy of the volume. Subsequent snapshots only store changed blocks. You are billed per GB-month of stored data. Cross-region copies incur standard egress fees.

Can I boot a VM directly from a snapshot?

No. Snapshots are block-level backups. You must first create a new volume from the snapshot, then attach it to an instance or convert it to a bootable image using cx image create --source-snapshot.