Velero — Backup, Migrate & Disaster Recovery for Kubernetes
Velero is the standard tool for backing up and restoring Kubernetes cluster resources and persistent volumes. Migrate workloads between clusters and recover from disasters.
What it is
Velero is an open-source tool for backing up and restoring Kubernetes cluster resources and persistent volumes. It provides disaster recovery, data migration between clusters, and scheduled backups to object storage (S3, GCS, Azure Blob). Velero is the standard tool in the Kubernetes ecosystem for cluster-level backup and restore operations.
Velero is designed for platform teams and cluster administrators who need reliable backup, migration, and disaster recovery for Kubernetes workloads.
How it saves time or tokens
Without Velero, backing up a Kubernetes cluster means manually exporting resources with kubectl, scripting volume snapshots, and building restore procedures from scratch. Velero handles all of this with a single CLI. A full cluster backup that would require a custom script runs in one command: velero backup create. Scheduled backups, retention policies, and selective restore (by namespace, label, or resource type) are built in.
How to use
- Install the Velero CLI:
brew install velero
- Install Velero in your cluster with an S3-compatible backend:
velero install \
--provider aws \
--plugins velero/velero-plugin-for-aws:v1.9.0 \
--bucket my-backup-bucket \
--backup-location-config region=us-east-1 \
--secret-file ./credentials-velero
- Create a backup and restore:
# Backup entire cluster
velero backup create full-backup
# Backup a specific namespace
velero backup create staging-backup --include-namespaces staging
# Restore from backup
velero restore create --from-backup full-backup
Example
Scheduled daily backups with 30-day retention:
velero schedule create daily-backup \
--schedule='0 2 * * *' \
--ttl 720h \
--include-namespaces production,staging \
--snapshot-volumes
This creates a daily backup at 2 AM UTC, retains backups for 30 days, includes only production and staging namespaces, and snapshots persistent volumes.
Related on TokRepo
- DevOps tools — Browse Kubernetes and infrastructure tools
- Self-hosted tools — Explore self-hosted infrastructure solutions
Common pitfalls
- Not testing restores regularly. A backup is worthless if the restore procedure has not been validated. Run periodic restore drills to a test cluster.
- Forgetting to include
--snapshot-volumesfor stateful workloads. Without this flag, Velero backs up Kubernetes resources (YAML) but not the data in persistent volumes. - Using the wrong storage provider plugin. Velero requires a plugin matching your object storage provider. Using the AWS plugin with GCS will fail silently.
- Starting with an overly complex configuration instead of defaults. Begin with the minimal setup, verify it works, then customize incrementally. This approach catches configuration errors early and keeps troubleshooting straightforward.
Frequently Asked Questions
Yes. Create a backup from the source cluster, configure Velero on the destination cluster to use the same backup storage location, and run a restore. This is the standard approach for cluster migrations and multi-cluster workflows.
Yes. Velero integrates with CSI (Container Storage Interface) volume snappers to create point-in-time snapshots of persistent volumes. You enable this with the --snapshot-volumes flag during backup.
Velero supports AWS S3, Google Cloud Storage, Azure Blob Storage, and any S3-compatible storage (MinIO, Ceph, Wasabi). Each backend requires its specific plugin.
Yes. Velero supports selective restore by namespace, resource type, label selector, or specific resource name. You can restore just the deployments from a namespace while leaving everything else untouched.
Velero backs up all API resources including CRDs and their instances by default. During restore, CRDs are recreated first, then their custom resource instances. This ensures proper restore order for operator-managed workloads.
Citations (3)
- Velero GitHub— Velero is the standard Kubernetes backup tool
- Velero Documentation— Backup and restore documentation
- Velero CSI Docs— CSI volume snapshot integration
Related on TokRepo
Discussion
Related Assets
Conda — Cross-Platform Package and Environment Manager
Install, update, and manage packages and isolated environments for Python, R, C/C++, and hundreds of other languages from a single tool.
Sphinx — Python Documentation Generator
Generate professional documentation from reStructuredText and Markdown with cross-references, API autodoc, and multiple output formats.
Neutralinojs — Lightweight Cross-Platform Desktop Apps
Build desktop applications with HTML, CSS, and JavaScript using a tiny native runtime instead of bundling Chromium.