Skip to content

Velero

Needs object store provider for backup

Limitations

  • hostPath volumes are not supported, but the local-path volume type is supported.
  • Volumes that are mounted with subPath are still backed up as a whole, not only the subPath

Install

Arch: pamac install velero-bin

Usage

Important: A root-level backup bucket needs to exist. Create a bucket:

mc mb varac/velero

Manual backup - Warning: always include --from-schedule <SCHEDULE>, in order to apply the configured esource-policy:

velero create backup --from-schedule daily-backup

List backups:

velero get backups
kubectl get -A backups.velero.io

Details of backup:

velero backup describe --details manual-test1
velero backup logs velero-daily-20240924153213

Get name of last backup:

velero get backup | grep -v '^NAME' | head -1 | cut -d' ' -f 1

List backupstoragelocations:

kubectl get -A backupstoragelocations.velero.io
velero get backup-locations

List backuprepositories:

k get -A backuprepositories.velero.io
velero repo get

List podvolumebackups:

kubectl get -A podvolumebackups.velero.io

List podVolumes in backup set:

velero backup describe --details -o json manual3 | jq .status.backupVolumes.podVolumeBackups.podVolumeBackupsDetails

Troubleshooting

See WARNINGS tab in list:

velero get backup

Show warnings/errors of particular backup:

velero backup logs velero-daily-20250613153248 |grep -v "level=info"

List backups with warnings:

velero get backup -o json | jq '.items[] | select (.status.warnings != null ) | .metadata.name' | sort

List all backup warnings:

velero get backup -o json | jq -r '.items[] | select (.status.warnings != null ) | .metadata.name' | sort | \
  xargs -n 1 velero backup logs | grep -v 'level=info'

Show pod names with warnings:

velero get backup -o json | jq -r '.items[] | select (.status.warnings != null ) | .metadata.name' | sort | \
  xargs -n 1 velero backup logs | grep 'level=warning' | \
  tr ' ' '\n' | grep '^name=.*,$'

Show velero controller warnings/erros:

kubectl -n velero logs velero-5c4589f99d-srjrx -c velero | grep -v 'level=info'

Delete backups

Docs: Deleting Backups

Delete the backup custom resource only and will not delete any associated data from object/block storage:

kubectl delete backups.velero.io <backupName> -n <veleroNamespace>

Delete the backup resource including all data in object/block storage:

velero backup delete <backupName>

Delete whole backuprepository:

kubectl -n velero delete backuprepositories.velero.io/monitoring-default-restic-tqx9l

File System Backup

Restic/Kopia repository password:

Solution:

Monitoring