The following steps demonstrate how to back up and restore an OpenShift virtual machine using OADP and RustFS as an S3-compatible backup target.
Prerequisites (Environment Used)
- OpenShift Cluster 4.20
- OpenShift Virtualization enabled
- Container Storage Interface (CSI): External ODF
- Any S3-compatible storage: RustFS
- OADP Operator
Install OADP Operator
The OpenShift API for Data Protection (OADP) Operator provides native backup, restore, and disaster recovery for OpenShift applications and persistent volumes. Built on the open-source Velero project, it automatically deploys Velero alongside custom OpenShift plugins to handle application configurations, secrets, and CSI volume snapshots.
- Go to Software Catalog, search for OADP, and click Install.

2. Click Install to proceed.

3. Installation takes a few minutes to complete.

S3 Storage
You can follow the official guide to install RustFS:
https://github.com/rustfs/rustfs

Create a bucket.

Create an access key.

On the OCP cluster, create an API key as a secret:
$ cat <<EOF > ./credentials-rustfs
[default]
aws_access_key_id=oadp
aws_secret_access_key=<your-secret-key>
EOF
$ oc create secret generic rustfs-backup-credentials \
–namespace openshift-adp \
–from-file cloud=./credentials-rustfs

Configure the S3 Bucket as a Backup Repository
You can download the YAML file using the link below:
https://github.com/Dineshk1205/ocpvmbkp/blob/c858dcbd0779fc952d9b4c5caa46b1a7d9ed4adc/b.yaml


Test VM Backup and Recovery
The testvm virtual machine is running in the vmtest namespace.

Configure a Backup of the vmtest VM
You can download the YAML using the following link:
https://github.com/Dineshk1205/ocpvmbkp/blob/c858dcbd0779fc952d9b4c5caa46b1a7d9ed4adc/vmbackup.yaml

Check the backup status — the backup completed successfully.


Delete the VM and Restore from the Backup
Let’s delete the VM and restore it from the backup.

You can download the YAML using the following link:
https://github.com/Dineshk1205/ocpvmbkp/blob/c858dcbd0779fc952d9b4c5caa46b1a7d9ed4adc/vmrestore.yaml

Restore completed successfully.


Similarly, you can configure incremental backups.
