Learn KOP - Part 2 - Create Backup Resources - Rafay Product Documentation

Part 2: Create Resources

This is Part 2 of a multi-part, self-paced quick start exercise.


What Will You Do

In part 2, you will setup the backup/restore resources in order to perform backup and restore operations. You will:


Step 1: Create Backup Cloud Credential

In this step, you will create cloud credentials for each of the clusters that will perform backup or restore operations. You will need a Service Principal with the Contributor role in order to create the cloud credentials for each cluster.

Perform the following steps for each cluster where backup or restore operations will be performed.

Alternatively, you can create the cloud credential using RCTL and build this into an automation pipeline. The following command could be used ensuring the credential name and Service Principal details are updated first.

rctl create credential azure <creds-name> --cred-type data-backup --client-id <client-id> --client-secret <client-secret> --tenant-id <tenant-id> --subscription-id <subscription-id>

Step 2: Create Backup Locations

In this step, we will create two backup locations which will store the control plane backup data and persistent volume data respectively. We will use an Azure Storage Account Container to store the data.

First, we will create the backup location for the Control Plane backups.

Alternatively, you can create the backup locations using RCTL and build this into an automation pipeline. The following commands could be used ensuring the arguments are updated first.

rctl create dp-location <name> --backup-type <controlplanebackup> --target-type <azure> --resource-group <resource-group> --storage-account <storage-account> --bucket-name <bucket-name>
rctl create dp-location <name> --backup-type <volumebackup> --target-type <azure> --resource-group <resource-group>

Step 3: Create Data Agents

In this step, we will create a data agent on each cluster where a backup or restore operation will occur. The agent on each cluster will be used to perform the backup/restore operations.

Perform the following steps for each cluster where backup or restore operations will be performed.

We must now deploy the agent to a cluster.

Alternatively, you can create and deploy the data agents using RCTL and build this into an automation pipeline. The following commands could be used ensuring the data agent name, cloud credential name and cluster name are updated first.

rctl create dp-agent <name> --cloud-credentials <cloudcredentials>
rctl deploy dp-agent <agent-name> --cluster-name <cluster-name>

Step 4: Create Backup and Restore Policies

In this step, you will create both a backup and a restore policy.

First, you will create a backup policy.

Alternatively, you can create the backup policy using RCTL and build this into an automation pipeline. The following command could be used ensuring the policy name, control plane location and volume location are updated first.

rctl create dp-policy <name> --type backup --location <location> --snapshot-location <snapshot-location> --retention-period 720h

Now, you will create a restore policy.

Alternatively, you can create the restore policy using RCTL and build this into an automation pipeline. The following command could be used ensuring the policy name is updated first.

rctl create dp-policy <name> --type restore --restore-pvs

Recap

In this part, you have created the needed backup and restore resources in order to be able to initiate backup and restore jobs on your two clusters.