PowerProtect Data Manager supports the self-service restore of namespaces from within the Kubernetes cluster. The following procedure describes how to perform a self-service restore:
Prerequisites
NOTE A Kubernetes administrator can list the 100 most recent
PowerProtect Data Manager backups that have taken place in the cluster within the last 30 days. Additionally, the last backup of every namespace backed up within the last 30 days using
PowerProtect Data Manager is listed. Any backups not listed have to be restored from the
PowerProtect Data Manager UI.
Steps
Run the following command to list
PowerProtect Data Manager backups performed within the last 30 days on the cluster:
kubectl get backupjob -n powerprotect
The command output lists all available
backupJob custom resources of
PowerProtect Data Manager, in the form
<namespace name><yyyy-mm-dd-hh-mm-ss>. For example:
admin@method:~> ~/k8s/kubectl get backupjob -n powerprotect
NAME AGE
testapp1-2019-11-16-14-15-47 3d9h
testapp1-2019-11-16-17-00-49 3d7h
Select the backup that you want to restore from the list, and then create a RestoreJob
yaml file in the following format:
apiVersion: "powerprotect.dell.com/v1beta1"
kind: RestoreJob
metadata:
name: <name for restore job>
namespace: powerprotect
spec:
recoverType: RestoreToNew #Default is RestoreToOriginal
backupJobName: <Name of the backupjob> # For e.g. testapp1-2019-11-16-14-15-47
namespaces:
- name: <namespace that needs to be recovered>
alternateNamespace: <new namespace name> # Name for the recovered namespace. Needed only for RestoreToNew. Should not be specified for RestoreToOriginal
persistentVolumeClaims:
- name: "*" #volumes to be recovered. By default all volumes backed up will be recovered