Use Tanzu Mission Control to restore the contents of a backup of data resources from your cluster.
Using Tanzu Mission Control, you can restore the results of a backup operation that might include an entire cluster or a subset of the data resources it contains.
Prerequisites
This procedure assumes that have a cluster on which you have already performed at least one backup operation.
Make sure you have the appropriate permissions.
- To restore a backup, you must be associated with the cluster.admin role in the cluster.
Procedure
- Log in to the Tanzu Mission Control console, and then navigate to the cluster detail page for the cluster.
- Click the Data Protection tab.
- On the Data Protection tab, in the Backups list, select the backup that you want to restore, and then click Restore.
- Specify what you want to restore from the selected backup.
- the entire backup
- selected namespaces
- resources identified by a label selector
- If you choose to restore selected namespaces, you can optionally modify the target namespace to which you want to restore.
- Select the namespace you want to restore.
- Click the name of the target namespace.
- In the Select target namespace dialog, select the namespace to which you want to restore. You can optionally create a new namespace by entering a name for it.
The name you provide can consist of lowercase letters, numbers, and hyphens.
- Click Confirm.
- You can optionally click Advanced options to specify which resources and namespaces to include or exclude.
- To exclude resources, enter the name of the resource you want to exclude, and then click Add.
Repeat this step to exclude multiple resources.
Note: TKG clusters come with Antrea installed, which includes a webhook that prevents certain Antrea-related resources from being updated. This may cause the overall restore to complete with a partially failed status. This can be avoided by configuring the restore to exclude the problematic resources
tiers.crd.antrea.io
and
tiers.security.antrea.tanzu.vmware.com
.
- To exclude namespaces, enter the name of the namespace you want to exclude, and then click Add.
Repeat this step to exclude multiple namespaces. This option is not available when restoring selected namespaces.
- Click to toggle Include cluster-scoped resources to true if you want to include resources that are cluster-scoped (rather than namespace-scoped), such as
CustomResourceDefinition
and ClusterRoles
in the restore.
If these resources were included in the backup, they will be restored. By default, cluster-scoped resources are restored if you restore the entire backup or resources identified by a label selector option.
- You can optionally click to toggle Update existing resource to true.
If you select this option, resources that are present in the backup overwrite the corresponding resources on the cluster using a patch. By default, an existing resource in the cluster is not modified even if it differs from its counterpart in the backup.
- Review and select the persistent volumes available to restore.
- Click Next.
- Provide a name for the restored backup.
The name you provide can consist of lowercase letters, numbers, and hyphens.
- Click Restore.