Restoring an application

You can restore backed-up data to the same project, a different project, or even a different cluster, while specifying the desired target storage classes.

Before you begin

  • When you restore an application from the Hub cluster to a Spoke cluster, manually check whether the same storageclass that is used to define the PVCs on the Hub exists on the Spoke cluster.
  • By default, if PVCs with the same name exist in the namespace, they get restored with a new name (original name + “-n” suffix with n=1,2,3). If you want to skip the restore of existing PVCs, manually create a Restore CR from the command line and set an optional spec field skipExistingPVC to true.
  • You must have OpenShift® APIs for Data Protection (OADP) version 1.3.1.
  • For the Datamover operator to restore CephFS and Global Data Platform 5.2.0+ snapshots by using the ReadOnlyMany access mode, ensure that the value of backingSnasphot is true in the storageclass.
  • Manually modify the restore when the original application already exists on the cluster and creates conflicts with each other.

About this task

  • You can use the following restore options for your applications:
    • From S3 to the same cluster and project
    • From S3 to the same cluster and existing project
    • From S3 to the same cluster and new project
    • From S3 to a different cluster
    • From S3 to IBM Software Hub.
    • Restore from snapshot
  • Backups that are taken using an In place snapshot can be restored only to the same project, and not to any new or a different project that exists. If you try to restore a project that is deleted from Red Hat® OpenShift, then the restore to the same project with In place snapshot does not include PVCs.

  • After you remove an Agent or Spoke connection from the Hub cluster, it does not show up in the Topology page. Also, you can restore the available (not expired) successful application backups with an object storage location from that cluster to a different cluster.
  • When you do a restore operation, the restored files, directories, and mount points can have different permissions, group, and owner from the source that was backed up; it is an expected behavior of Red Hat OpenShift design. For more information, see OpenShift documentation and https://access.redhat.com/solutions/7007252. You can modify this behavior by using security context constraints (SCCs), parameters such as fsGroup, or a custom script or command such as chmod or chown.
  • IBM Cloud Paks instance backups cannot be created when continuous backup is enabled on the MongoDB service.
  • You can restore backup data to a different StorageClass provisioner on an alternate cluster, for example, restore data that was originally backed-up from a CephFS provisioned StorageClass to a Scale provisioned StorageClass.

Procedure

  1. In the menu, click Applications.
  2. In the Applications page, search and open your application that you want to restore.
  3. In the application details page, go to the Backups tab and from the ellipsis overflow menu of the backup record, click Restore option.
    Alternatively, go to the Backed up applications page and select Restore option from the ellipsis overflow menu of an application record.
    A Restore Application <application name> slide out window gets displayed.
  4. In the Restore Application <application name>, select a Cluster destination where you want the application to be restored.
  5. Select a Project destination for the application data.
    Single namespace to the same or new cluster
    For a single namespace, you can choose from any of the following options:
    Note: For the single namespace to same or new cluster, the option Choose existing project is only available for same cluster restores.
    • If you select the Use same project option, then click Next and proceed.
    • If you select Choose existing project option, then select a Project from the list and click Next to proceed.
    • If you select Create a new project option, then enter the name of the project and click Next to proceed.
    Multi-namespace to the same or new cluster
    For multiple namespaces, you can choose from any of the following options:
    • If you select the Use same project option, then click Next and proceed.
    • If you select Create a new project option, then select Project suffix and click Next to proceed.

      The Project suffix is used to avoid name conflicts by associating it with a specific namespace. For example, if you select enter 123 for Project suffix, then in the preview you can see <Project name>-one-123. You can also choose different combinations of available suffixes in the Suffix preview.

    The details in the Summary section vary based on your selections.
  6. If you have not selected the backups, then select the backups that you want to restore and click Next.
  7. If you do not want to use the existing Target storage class in your cluster to restore the PVCs, then select Change target storage class and enter a storage class of the same type to change it.
    By default, restore occurs on a matching storage class name. If TargetStorageClass is specified, then restore happens on PVCs from this class. If the original storage class is non-existent or TargetStorageClass is not provided, the default storage class of the cluster is used.
    Example scenarios where there may be a need to change the Target storage class are as follows:
    • If there is a requirement for a filesystem PVC with RWX access mode that a particular storage class (such as RBD) does not support, consider using an alternative storage class that meets the requirement.
    • An application may require a storage class with specific attributes, such as a particular compression or encryption setting.
    The restore does not overwrite existing PVCs instead new PVCs are created with an annotated name. Modify your application deployment to use the new PVCs.
  8. In the Missing etcd resources section, select Include missing etcd resources to restore non-PVC application resources that are included in this backup but do not exist in this Red Hat OpenShift project.
    Note: If you do not select the Missing etcd resources, the application-specific pods that need deployment resources or jobs may not start.
  9. If you select Only restore a subset of selected PVCs, then select all PVCs or choose individual PVCs from the selected backup to restore.
  10. Check the Summary and confirm the changes after restore.
  11. Click Restore.
    A message appears informing that the restore of the application from its backup is in progress. The status of the backup record in the Backups tab is initially set to Restoring and then it changes to Completed.
  12. Go to the application to confirm the success of the restore operation.

What to do next

Storage classes that are used by applications on the source cluster must exist or be created on the target cluster before you attempt to restore the applications that use those classes.