Skip to main content
Skip table of contents

Velero with Google Cloud Storage Buckets - Establish a Backup Location

Create a Backup Storage Location

  1. Create a location for the backup by pointing to an existing GCS bucket:
    (info) Ensure you set the required environment variables as specified in Velero with Google Cloud Storage Buckets - Prepare your Environment.
    (info) Replace <gcp-backup-location-name> with a name for the backup location.

    CODE
    velero backup-location create <gcp-backup-location-name> -n ${WORKSPACE_NAMESPACE} \
    --provider gcp \
    --bucket $BUCKET \
    --credential=velero-gcp-credentials=gcp
  2. Check that the backup storage location is Available and that it references the correct GCS bucket:

    CODE
    kubectl get backupstoragelocations -n ${WORKSPACE_NAMESPACE} -oyaml

Create a Test Backup

  1. Create a test backup that is stored in the location you created in the previous section:

    CODE
    velero backup create gcp-velero-testbackup -n ${WORKSPACE_NAMESPACE} \
    --kubeconfig=${CLUSTER_NAME}.conf \
    --storage-location <gcp-backup-location-name> \
    --snapshot-volumes=false
  2. View your backup:

    CODE
    velero backup describe gcp-velero-testbackup

Troubleshooting
  1. If your backup wasn’t created, Velero may have had an issue installing the plugin. If the plugin was not installed, run this command:

    CODE
    velero plugin add velero/velero-plugin-for-gcp:v1.5.0 -n ${WORKSPACE_NAMESPACE}
  2. Confirm your backupstoragelocation was configured correctly

    CODE
    kubectl get backupstoragelocations -n ${WORKSPACE_NAMESPACE}

    If your backup storage location is “Available”, proceed creating a test backup.

    CODE
    NAME             PHASE       LAST VALIDATED   AGE   DEFAULT
    <gcp-backup-location-name>       Available   38s              60m   

Next Step:

Back up with Velero

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.