Velero with Google Cloud Storage Buckets - Establish a Backup Location
Create a Backup Storage Location
Create a location for the backup by pointing to an existing GCS bucket:
Ensure you set the required environment variables as specified in Velero with Google Cloud Storage Buckets - Prepare your Environment.
Replace<gcp-backup-location-name>
with a name for the backup location.CODEvelero backup-location create <gcp-backup-location-name> -n ${WORKSPACE_NAMESPACE} \ --provider gcp \ --bucket $BUCKET \ --credential=velero-gcp-credentials=gcp
Check that the backup storage location is
Available
and that it references the correct GCS bucket:CODEkubectl get backupstoragelocations -n ${WORKSPACE_NAMESPACE} -oyaml
Create a Test Backup
Create a test backup that is stored in the location you created in the previous section:
CODEvelero backup create gcp-velero-testbackup -n ${WORKSPACE_NAMESPACE} \ --kubeconfig=${CLUSTER_NAME}.conf \ --storage-location <gcp-backup-location-name> \ --snapshot-volumes=false
View your backup:
CODEvelero backup describe gcp-velero-testbackup