Restoring an application

Restore a backed up application.

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 can restore backup data to a different StorageClass provisioner on an alternative cluster, for example, restore data that was originally backed-up from a CephFS provisioned StorageClass to a Scale provisioned StorageClass. The Restore CR includes an optional spec field, targetStorageClass, where you can specify a specific storage class for the restore. It is only available through manually created Restore CRs from the command line or command prompt.
    • If the targetStorageClass is not provided, the same storage class as the backup is attempted for the restore.
    • If the targetStorageClass field is not provided and the same storage class as the backup is not available, the default storage class of the system is used.
    The targetStorageClass is not supported for IBM Cloud Pak for Data.
  • 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.

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 Cloud Pak for Data.
  • 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.

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>, Restore destination cluster where the application must be restored.
    • Same cluster
    • New cluster
      Note: Only S3 backups can be restored to a different cluster. If you do not have Spoke clusters, this option is not available.
    The details in the Summary section vary based on your selections.
  5. Select the destination:
    Option Description
    Same cluster In the Project destination section, you can choose to restore to any of the following locations:
    Use the same project the application is already using
    Existing project
    Select the project from the drop-down list.
    Create a new project
    If you select Create a new project, then enter a new project.
    Note: If you choose Existing project or Create new project, you can specify only a single namespace.You cannot restore multiple namespaces to a single alternative namespace.
    New cluster
    1. In the Restore destination section, select the cluster where you want to restore your application.
    Note: From the IBM Storage Fusion user interface, you cannot restore to a cluster that does not have an identical storage class name as the originator cluster. The same storage class name is needed in the destination or the target cluster. However, only the storage class name must be identical to the backup, while the underlying provisioner can be native to the target cluster. If the identical storage class is not found, the default storage class is used. If you want to restore backup data to a different StorageClass provider, do this through the command line or command prompt. See Before you begin section of this topic to know how to use the targetStorageClass field in the Restore CR.
  6. Click Next.
  7. If you have not selected the backups, then select the backups that you want to restore and click Next.
  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. 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 changes to Completed.
  11. 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.