Restore Applications

In this last section we are going to perform the restores of the previous backed up applications. In order to check that the restores of the backups have been done successfully, we ned to simulate a disaster scenario. To do so, we are going to delete the namespaces created in the previous section.

restore

Restore simple application

  1. Firstly, delete the application-01 namespace.

oc delete project application-01
  1. Create a new Restore resource, specifying the namespace we want to restore. The yaml view of the resource will look like this:

apiVersion: velero.io/v1
kind: Restore
metadata:
  name: restore-app01
  namespace: openshift-adp
spec:
  backupName: backup-app01

In order to check that the restore has finished successfully, it has to be marked as Completed.

app01 1

And the application-01 project has to be available again in the cluster.

oc project application-01

Restore application with persistent storage using Snapshots

  1. Firstly, delete the application-02 namespace.

oc delete project application-02
  1. Create a new Restore resource, specifying the namespace we want to restore and making sure that the option restorePVs is set to true. The yaml view of the resource will look like this:

apiVersion: velero.io/v1
kind: Restore
metadata:
  name: restore-app02
  namespace: openshift-adp
spec:
  backupName: backup-app02
  restorePVs: true

In order to check that the restore has finished successfully, it has to be marked as Completed.

app02 1

And the application-02 project has to be available again in the cluster.

oc project application-02

Restore application with persistent storage using Restic

  1. Firstly, delete the application-03 namespace.

oc delete project application-03
  1. Create a new Restore resource, specifying the namespace we want to restore. In this case, we do not have to enable the restorePVs option as we performed the backup using Restic. The yaml view of the resource will look like this:

apiVersion: velero.io/v1
kind: Restore
metadata:
  name: restore-app03
  namespace: openshift-adp
spec:
  backupName: backup-app03

In order to check that the restore has finished successfully, it has to be marked as Completed.

app03 1

And the application-03 project has to be available again in the cluster.

oc project application-03

Restore application with persistent storage using Data Mover

  1. Firstly, delete the application-04 namespace.

oc delete project application-04
  1. Create a new Restore resource, specifying the namespace we want to restore and making sure that the option restorePVs is set to true as in the second example. The yaml view of the resource will look like this:

apiVersion: velero.io/v1
kind: Restore
metadata:
  name: restore-app04
  namespace: openshift-adp
spec:
  backupName: backup-app04
  restorePVs: true

In order to check that the restore has finished successfully, it has to be marked as Completed.

app04 1

And the application-04 project has to be available again in the cluster.

oc project application-04