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 simple application
-
Firstly, delete the
application-01
namespace.
oc delete project application-01
-
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.

And the application-01
project has to be available again in the cluster.
oc project application-01
Restore application with persistent storage using Snapshots
-
Firstly, delete the
application-02
namespace.
oc delete project application-02
-
Create a new Restore resource, specifying the namespace we want to restore and making sure that the option
restorePVs
is set totrue
. 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.

And the application-02
project has to be available again in the cluster.
oc project application-02
Restore application with persistent storage using Restic
-
Firstly, delete the
application-03
namespace.
oc delete project application-03
-
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 usingRestic
. 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.

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
-
Firstly, delete the
application-04
namespace.
oc delete project application-04
-
Create a new Restore resource, specifying the namespace we want to restore and making sure that the option
restorePVs
is set totrue
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.

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