velero(1)
Velero is a backup and disaster recovery tool for Kubernetes clusters and persistent volumes.
Synopsis
velero [command] [flags]Description
Velero is an open-source tool that helps you safely back up and restore, perform disaster recovery, and migrate Kubernetes cluster resources and persistent volumes. It works by taking snapshots of your entire cluster or specific namespaces and storing them in object storage like AWS S3, Azure Blob Storage, or MinIO.
Velero can back up cluster-wide resources (deployments, services, configmaps), persistent volume data, and can schedule automated backups. It supports selective restore operations, allowing you to recover specific resources or entire namespaces.
Common options
| Flag | What it does |
|---|---|
--kubeconfig | path to kubeconfig file for cluster access |
--namespace | Kubernetes namespace where Velero is installed (default: velero) |
--storage-location | name of the BackupStorageLocation to use for backups |
--volume-snapshot-location | name of the VolumeSnapshotLocation for persistent volumes |
--selector | label selector to filter resources by labels |
--include-namespaces | comma-separated list of namespaces to include in backup |
--exclude-namespaces | comma-separated list of namespaces to exclude from backup |
--wait | wait for operation to complete before returning |
-o, --output | output format (json, yaml, or table) |
Examples
create an on-demand backup of the entire cluster
velero backup create my-backupbackup only the production and monitoring namespaces
velero backup create prod-backup --include-namespaces production,monitoringlist all existing backups with their status and size
velero backup getrestore all resources from a previous backup
velero restore create --from-backup my-backuprestore resources from backup but only into the dev namespace
velero restore create --from-backup my-backup --include-namespaces devschedule a backup to run daily at 2 AM using cron syntax
velero schedule create daily-backup --schedule='0 2 * * *'view detailed logs from a specific backup operation
velero backup logs my-backupshow detailed information about a backup in YAML format
velero backup describe my-backup -o yaml