Share via


Create an Azure Red Hat OpenShift 4 cluster application restore using Velero

In this article, you prepare your environment to create a Microsoft Azure Red Hat OpenShift cluster application restore. You learn how to:

  • Setup the prerequisites and install the necessary tools
  • Create an Azure Red Hat OpenShift 4 application restore

If you choose to install and use the CLI locally, this article requires that you're running the Azure CLI version 2.6.0 or later. To find the version, run az --version. If you need to install or upgrade, see Install Azure CLI.

Prerequisites

Restore an Azure Red Hat OpenShift 4 Application

These steps allow you to restore an application that was backed up with Velero. You can check the list of cluster backups to see which backups are available for restore.

To list the backups, run the following command that assumes that you installed Velero in a project named velero.

oc get backups -n velero

After you have the backup that you want to restore, you do the restore with the following command.

velero restore create <name of restore> --from-backup <name of backup from above output list>

This step creates the Kubernetes objects that were backed up from the previous step when creating a backup.

To see the status of the restore, run the following command.

oc get restore -n velero <name of restore created previously> -o yaml

When the phase says Completed, your Azure Red Hat OpenShift application should be restored.

Restore an Azure Red Hat OpenShift 4 application with included snapshots

To create a restore of an Azure Red Hat OpenShift 4 application with persistent volumes that use Velero, you do the restore with the following command.

velero restore create <name of the restore> --from-backup <name of backup from above output list> --exclude-resources="nodes,events,events.events.k8s.io,backups.ark.heptio.com,backups.velero.io,restores.ark.heptio.com,restores.velero.io"

This following command creates the Kubernetes objects that were backed up from the previous command.

To see the status of the restore, execute the following command.

oc get restore -n velero <name of restore created previously> -o yaml

When the phase says Completed, your Azure Red Hat OpenShift application should be restored.

For more information, see Backup OpenShift resources the native way.

Next steps

In this article, an Azure Red Hat OpenShift cluster application was restored. You learned how to:

  • Create a OpenShift v4 cluster application restore using Velero
  • Create a OpenShift v4 cluster application restore with snapshots using Velero

For information about Azure Red Hat OpenShift supported resources, see Azure Red Hat OpenShift v4 supported resources.