In case you have to update Velero helm chart, these are the steps to test basic backup functionality:
Prequisite: Download the Velero CLI same version as Velero server image.
-
Start a command shell with configured kubeconfig for your cluster:
banzai cluster --cluster-name YOUR_CLUSTER_NAME shell INFO[0001] Running /bin/zsh
-
Install Wordpress or some example app which is creates persistent volumes:
helm repo add bitnami https://charts.bitnami.com/bitnami helm install wordpress bitnami/wordpress
-
Make sure persistent volumes were created:
kubectl get pv NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE pvc-44d380a1-556a-4834-a39d-f4f325b5f894 8Gi RWO Delete Bound default/data-wordpress-mariadb-0 gp2 2s pvc-be31fdfd-ec26-4744-8af5-2378c2dce476 10Gi RWO Delete Bound default/wordpress gp2 2s
-
Enable Backup service for cluster:
banzai cluster --cluster-name YOUR_CLUSTER_NAME service backup enable ? Schedule backups for every daily ? Keep backups for 1 day ? Select storage provider: Amazon S3 ? Provider secret: aws-scratch-s3 ? Bucket name: {YOUR_S3_BUCKET_NAME} ? Service Account Role ARN to use for Velero ? Use provider secret to give access for Velero to make volume snapshots Yes INFO[0019] Enabling backup service for [100] cluster INFO[0070] Backup service is enabled for [100] cluster
-
Check Velero deployment is running and backup resource has been created:
kubectl get deployment -n pipeline-system NAME READY UP-TO-DATE AVAILABLE AGE ... velero 1/1 1 1 6m15s kubectl get backup -n pipeline-system NAME AGE h1vmlol1awy8a-20210910122426 158m
-
List backups with Velero CLI:
velero backup get -n pipeline-system NAME STATUS ERRORS WARNINGS CREATED EXPIRES STORAGE LOCATION SELECTOR YOUR_CLUSTER_NAME-20210910122426 Completed 0 0 2021-09-10 14:24:26 +0200 CEST 21h default <none>
-
Check that logs are available:
velero backup logs YOUR_CLUSTER_NAME-20210910122426 -n pipeline-syste
You may also check that backup log and content files are available on S3 bucket you have specified at step 4.