SOP Velero
- 
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. 
Steps
- 
Install the Velero CLI client. eg: wget https://github.com/vmware-tanzu/velero/releases/download/v1.8.1/velero-v1.8.1-linux-amd64.tar.gz tar -zxf velero-v1.8.1-linux-amd64.tar.gz ln -s velero-v1.8.1-linux-amd64/velero ~/bin/velero 
- 
Configure Velero to access S3 Create a file credentials-velerowhich contains the AWS access key and secret access key with permissions to access an S3 bucket.[default] aws_access_key_id=XXX aws_secret_access_key=XXX 
- 
Next install Velero in the cluster Ensure you are authenticated to the OpenShift cluster via the CLI. Using something like the following: REGION="us-east-1" S3BUCKET="fedora-openshift-migration" 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 \ --use-restic
- 
Perform a backup eg: velero backup create backupName --include-cluster-resources=true --ordered-resources 'persistentvolumes=pvName' --include-namespaces=namespaceName 
- 
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].
Want to help? Learn how to contribute to Fedora Docs ›