Skip to content

Restore Policy

Administrators can create a restore policy to specify the rules a restore job has to comply with when it performs a restore operation.


Create Restore Policy

Follow below steps to create a restore policy for your clusters:

  • From web console, navigate to Backup/Restore -> Policies menu to add "New Policy"
  • Enter a name and an optional description
  • Select Type "Restore"

Add Restore Policy

  • In the Restore Policy Settings page > Config section, check/uncheck "Restore PVs" checkbox to enable/disable restore persistent volume data.

Example: Control Plane and PVs

Here is an example of a policy to restore both cluster control plane and persistent volumes data

Configure Restore Policy


Example: Only Control Plane

Here is an example of a policy to restore only cluster control plane data and no persistent volumes.

Configure Restore Policy


Advanced Options

In a manner similar to a backup policy, administrators can specify fine-grained controls for the restore policy. You can optionally use "target selectors" to refine the scope of the backup policy. You have three options

  • Include namespaces (restores performed only from the selected namespaces)
  • Exclude namespaces (skip these namespaces for restore operations)
  • Specify label selectors (restore resources that match the labels)

Here is an example of a restore policy where the administrator only wishes to restore the cluster data for the "apache" namespace

Configure Restore Policy


RCTL for Restore Policy

Administrators can also create a restore policy through RCTL using the below commands to specify the rules a restore job has to comply with when it performs a restore operation

Create Restore Policy

./rctl create dp-policy <name> --type <restore> --restore-pvs --include-namespace <include-ns> --exclude-namespace <exclude-ns> --label-selector <key:value,key:"",key:value>

Fetch Policy

./rctl get dp-policy <name>

Update Restore Policy

./rctl update dp-policy <name> --type <restore> --restore-pvs --include-namespace <include-ns> --exclude-namespace <exclude-ns> --label-selector <key:value,key:"",key:value>

Delete Policy

./rctl delete dp-policy <name>