SOP Velero

This SOP should be used in the following scenario:
  • Performing a data migration between OpenShift clusters.

  • Performing a data backup to S3

  • Velero doesn’t support restoring into a cluster with a lower Kubernetes version than where the backup was taken.


  1. Install the Velero CLI client.


    tar -zxf velero-v1.8.1-linux-amd64.tar.gz
    ln -s velero-v1.8.1-linux-amd64/velero ~/bin/velero
  2. Configure Velero to access S3

    Create a file credentials-velero which contains the AWS access key and secret access key with permissions to access an S3 bucket.

  3. Next install Velero in the cluster

    Ensure you are authenticated to the OpenShift cluster via the CLI.

    Using something like the following:

    velero install \
        --provider aws \
        --plugins velero/velero-plugin-for-aws:v1.4.0 \
        --bucket $S3BUCKET \
        --backup-location-config region=$REGION \
        --snapshot-location-config region=$REGION \
        --use-volume-snapshots=true \
        --image velero/velero:v1.4.0  \
        --secret-file ./credentials-velero \
  4. Perform a backup


    velero backup create backupName --include-cluster-resources=true --ordered-resources 'persistentvolumes=pvName' --include-namespaces=namespaceName
  5. Restore a backup

    While authenticated to a second cluster to restore to, or original cluster where you are recovering to you can restore a backup like so:

    velero backup get
    velero restore create --from-backup backupName

For more information see the Velero documentation at [1].