Using Velero commands for SPI Backup and Restore
Velero is a tool for managing disaster recovery, specifically for Kubernetes (K8s) cluster resources. It provides a simple, configurable, and operationally robust way to back up your application state and associated data. If you're familiar with kubectl, Velero supports a similar model, allowing you to execute commands such as 'velero get backup' and 'velero create schedule'. The same operations can also be performed as 'velero backup get' and 'velero schedule create'. Instead of using the SPI admin UI to do backup and restore, one can also use velero CLI to achieve the same. Create SPI backup
Schedule a backup:
Troubleshooting a failed backup:
Please use velero debug --backup <backupname> to generate the support bundle, and attach to the ticket, more options please refer to velero debug --help
Sample:
To check the status and get information on the backup:
To fetch the logs of the Velero server pod. This provides the output of the Velero server processes:
Getting velero debug logs. You can increase the verbosity of the Velero server by editing your Velero deployment to look like this:
Download all Kubernetes manifests for a backup:
To list all backups and to see the status and date created:
To find a backup location:
To create a backup location with Read/Write:
Backup to S3 location using CA cert:
To delete backup:
If after issuing the above command, the backup is still stuck in deleting force deletion with the command below:
Use the velero help to get more information and all the available commands and Flags
Use "velero [command] --help" for more information about a particular command:
To Restore:
Common Errors
InProgress - Velero (or a pod it was backing up) restarted during a backup and the backup is stuck InProgress Velero cannot currently resume backups that were interrupted. Backups stuck in the InProgress phase can be deleted with kubectl delete backup <name> -n <velero-namespace>. Backups in the InProgress phase have not uploaded any files to object storage.