Skip to main content

Backup & Restore with Velero

This tutorial describes how to backup and restore a namespace with Velero. In this tutorial we'll use the tenant-demo namespace for this procedure.

be aware that CSI snapshotting doesn't work on the local Kind environment. On cloud environments this should actually be supported by the concerning CSI driver.

Prerequisites

  • Ensure you have installed the velero-cli.

1. Create a backup

velero backup create demo-backup --include-namespace tenant-demo

2. Verify the backup has been created successfully without errors

velero backup describe demo-backup

3. (optional) verify backup folder in your Object Storage

In case you're running this on a local Kind cluster, use the following command to verify whether data has actually been backed up to Garage S3:

$ kubectl -n garage exec garage-0 -c garage -- /garage bucket info velero

==== BUCKET INFORMATION ====
Bucket: 71e895060eed95c197f0dbb43424ac532c412dfddc64f8378519fc4e8570ccf9
Created: 2026-07-07 10:43:11.036 +00:00

Size: 206.2 kB (201.4 KiB)
Objects: 20

4. Simulate a disaster by destroying the tenant-demo namespace

kubectl delete namespace tenant-demo

# Wait for the namespace to be deleted

5. Restore tenant-demo's lost resources

velero restore create --from-backup demo-backup