kubernetes

OpenShift VM Backup and Restore

The following steps demonstrate how to back up and restore an OpenShift virtual machine using OADP and RustFS as an S3-compatible backup target.

  • 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.

  1. 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.

        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.

        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.

        Dineshreddy Kayithi

        Rooted in a solid academic foundation with a Bachelor's Degree in Information Technology, my career has been deeply entrenched in designing, deploying, and managing enterprise-grade infrastructure across virtualization, cloud-native, and containerized environments. Industry certifications from VMware, AWS, Microsoft, and Kubernetes validate my hands-on expertise in architecting scalable, resilient systems spanning hypervisors, public/hybrid cloud platforms, and container orchestration frameworks. I'm driven by a relentless pursuit of emerging technologies — translating them into production-ready solutions that solve complex operational challenges.

        Recent Posts

        NVIDIA RAG Pipeline: Deploying on Your Own Kubernetes Platform

        Retrieval-Augmented Generation (RAG) is a way of getting an LLM to answer questions using your…

        3 weeks ago

        OpenStack Multi-Node Deployment — Kolla-Ansible 2026.1

        Kolla-Ansible is an official OpenStack project and a production-recommended deployment method. Ubuntu 24.04 · 3…

        1 month ago

        NVIDIA Base Command Manager Deployment

        NVIDIA Base Command Manager (BCM) provides cluster management software for streamlining cluster provisioning, workload management,…

        1 month ago

        Canary Deployments on OpenShift with GitOps: A Practical Walkthrough

        Shipping a new version of an application is always a small act of faith. Even…

        2 months ago

        Red Hat OpenShift VM Micro-segmentation Using MultiNetworkPolicy

        OpenShift Virtualization allows virtual machines (VMs) to run natively on Kubernetes alongside container workloads. Using…

        5 months ago

        Red Hat OpenStack Services on OpenShift (RHOSO)

        Red Hat OpenStack Services on OpenShift (RHOSO) provides the foundation to build a private or public…

        6 months ago