Skip to content

Latest commit

 

History

History
104 lines (60 loc) · 4.83 KB

tkg-data-protection.md

File metadata and controls

104 lines (60 loc) · 4.83 KB

Enable Data Protection on a Workload Cluster and Configure Backup

You can run backup and restore operations in Tanzu Mission Control to protect your Kubernetes data.

Prerequisites

Before you enable Data Protection on a workload cluster, ensure the following prerequisites:

  • You have an active Tanzu Mission Control subscription.

  • The workload cluster that you want to protect is registered or attached with Tanzu Mission Control.

  • You have created a credential for Data Protection as per instructions provided in the Tanzu Mission Control documentation.

  • You have created a Target Location for Data Protection as per instructions provided in the Tanzu Mission Control documentation.

For more information about protecting the data resources in your Kubernetes clusters, see Data Protection in VMware Tanzu Mission Control Concepts.

Enable Data Protection on Workload Cluster

To enable data protection on a workload cluster,

  1. Locate the cluster in the Tanzu Mission Control portal and click on the Overview tab.

  2. In the Data protection section, click Enable Data Protection.

    Tanzu Mission Control Overview

  3. Click Enable on the confirmation dialog.

    Enable data protection dialog

It takes approximately 5-10 minutes to enable data protection on a Kubernetes cluster. Tanzu Mission Control creates a namespace named Velero and installs Velero related Kubernetes objects in the workload cluster.

root@arcas [ ~ ]# kubectl get all -n velero
NAME                          READY   STATUS    RESTARTS   AGE
pod/restic-nfbpl              1/1     Running   0          44s
pod/restic-q57nk              1/1     Running   0          44s
pod/restic-sj954              1/1     Running   0          44s
pod/velero-57cdf5f99f-7fn4b   1/1     Running   0          71s

NAME                    DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
daemonset.apps/restic   3         3         3       3            3           <none>          45s

NAME                     READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/velero   1/1     1            1           71s

NAME                                DESIRED   CURRENT   READY   AGE
replicaset.apps/velero-57cdf5f99f   1         1         1       72s

Configure Backup

After enabling data protection,

  1. In the Data protection section, click Create Backup to configure backup for the workload cluster.

    Tanzu Mission Control Overview

    Tanzu Mission Control Data Protection allows you to create backups of the following types:

    • All resources in a cluster.
    • Selected namespaces in a cluster.
    • Specific resources in a cluster identified by a given label.

    Create backup dialog - Backup source

  2. Select the target location where the backup will be stored.

    Create backup dialog - Backup target location

  3. Configure the backup schedule and click Next.

    Create backup dialog - Backup schedule

  4. Specify the backup retention period and click Next.

    Create backup dialog - Backup retention period

  5. Specify a name for the backup schedule and click Create.

    Create backup dialog - Specify backup name and create

Backup configuration may take some time depending on the Kubernetes objects that you have provisioned in the workload cluster. When backup is configured for the first time, Tanzu Mission Control takes a backup immediately. After that backups are taken as per the backup schedule configured.

Tanzu Mission Control - Backups and schedules

Restore Backup

To restore the Kubernetes data from the backup,

  1. Go to Data Protection.

  2. Select the backup image and click Restore.

    Restore backup image

  3. Select the resources that you want to restore.

    Select resources for restoring

  4. Specify a name for the restore task and click Restore.

    Specify restore task name

If you have backed up persistent volumes, the restore process may take some time. The backup is restored in the same cluster from which it was retrieved.