Synopsis
Create and manage snapshots of virtual clusters for backup and restore.
vcluster snapshot [command] [flags]
Subcommands
create - Create a new snapshot
get - List existing snapshots
delete - Delete a snapshot
vcluster snapshot create
Create a snapshot of a virtual cluster.
Synopsis
vcluster snapshot create VCLUSTER_NAME [flags]
Examples
# Create snapshot to OCI registry
vcluster snapshot create my-vcluster -n team-x \
--backend oci://myregistry.io/vcluster-snapshots
# Create snapshot to S3
vcluster snapshot create my-vcluster -n team-x \
--backend s3://my-bucket/snapshots
# Create snapshot with name
vcluster snapshot create my-vcluster -n team-x \
--backend oci://myregistry.io/snapshots \
--name pre-upgrade-backup
Flags
The Kubernetes namespace where the vCluster is running.
Storage backend for the snapshot. Supports: oci://, s3://, or local path.
Custom name for the snapshot. Defaults to timestamp.
Include persistent volume data in the snapshot.
vcluster snapshot get
List snapshots for a virtual cluster.
Synopsis
vcluster snapshot get VCLUSTER_NAME [flags]
Examples
# List snapshots
vcluster snapshot get my-vcluster -n team-x \
--backend oci://myregistry.io/snapshots
# JSON output
vcluster snapshot get my-vcluster -n team-x \
--backend oci://myregistry.io/snapshots \
--output json
Flags
The Kubernetes namespace.
Storage backend where snapshots are stored.
Output format: table or json.
Complete Example
#!/bin/bash
VCLUSTER="prod-vcluster"
NAMESPACE="production"
BACKEND="oci://myregistry.io/backups"
# Create pre-upgrade snapshot
echo "Creating snapshot..."
vcluster snapshot create $VCLUSTER -n $NAMESPACE \
--backend $BACKEND \
--name "pre-upgrade-$(date +%Y%m%d)" \
--include-volumes
# List all snapshots
echo "Available snapshots:"
vcluster snapshot get $VCLUSTER -n $NAMESPACE --backend $BACKEND
# Proceed with upgrade
vcluster create $VCLUSTER -n $NAMESPACE --upgrade
See Also