$linuxjunkies
>

velero(1)

Velero is a backup and disaster recovery tool for Kubernetes clusters and persistent volumes.

UbuntuDebianFedoraArch

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

FlagWhat it does
--kubeconfigpath to kubeconfig file for cluster access
--namespaceKubernetes namespace where Velero is installed (default: velero)
--storage-locationname of the BackupStorageLocation to use for backups
--volume-snapshot-locationname of the VolumeSnapshotLocation for persistent volumes
--selectorlabel selector to filter resources by labels
--include-namespacescomma-separated list of namespaces to include in backup
--exclude-namespacescomma-separated list of namespaces to exclude from backup
--waitwait for operation to complete before returning
-o, --outputoutput format (json, yaml, or table)

Examples

create an on-demand backup of the entire cluster

velero backup create my-backup

backup only the production and monitoring namespaces

velero backup create prod-backup --include-namespaces production,monitoring

list all existing backups with their status and size

velero backup get

restore all resources from a previous backup

velero restore create --from-backup my-backup

restore resources from backup but only into the dev namespace

velero restore create --from-backup my-backup --include-namespaces dev

schedule 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-backup

show detailed information about a backup in YAML format

velero backup describe my-backup -o yaml

Related commands