• Cloud-Native Container ProductsCloud-Native Container Products
    • KubeSphere Enterprisehot
    • KubeSphere Virtualizationhot
    • KubeSphere Enterprise HCI
  • Cloud-Native ServiceCloud-Native Service
    • KubeSphere Backuphot
    • KubeSphere Litenew
    • KubeSphere Inspectornew
  • Public Cloud Container ServicePublic Cloud Container Service
    • KubeSphere on AWS
    • KubeSphere on DigitalOcean

Create a recovery plan

Describes how to create a recovery plan on the console.

This topic describes how to create a recovery plan on the console.

Prerequisites

Create a recovery plan

  1. Log in to the KubeSphere Cloud platform with your account.

  2. In the upper-right corner, hover your cursor over the username area and click Console from the drop-down list.

  3. In the navigation pane on the left, click Backup and Recovery > Recovery Plans, and then click Create Recovery Plan.

    common:NOTE

    You can also click Create under Recovery Plans on the Overview page.

  4. On the Create Recovery Plan page, set the following parameters.

    ParameterRequiredDescription
    NameYesUser-defined name of the recovery plan. The name can contain only lowercase letters, numbers, and hyphens (-), and must start and end with a lowercase letter or number. The maximum length is 63 characters.
    Backup JobsYesSelect the backup job to be used for the recovery plan. You can specify the backup job from the existing executed ones or by filtering them:
    • Click the Specify backup time box and select one day or a period in the pop-up menu to specify the time when the backup job was executed.
    • Click the search box, select Name or Namespace, enter the name of the backup plan or the name of the source namespace, and press Enter to search for the backup job.
    DescriptionNoUser-defined description of the recovery plan.
    Recovered ToYes
    • Target Cluster: Select an imported Kubernetes cluster from the drop-down list as the target cluster for the recovery plan.
      If you have not imported the target cluster, click Import to import it. After the target cluster is imported, click and then select it from the drop-down list.
    • Namespace Mapping: Set the mapping relationship between the source and target namespaces.
    VolumesNoIf you select Copy Volumes or select Export snapshot when choosing Use CSI Snapshot, the following parameters are displayed.
    • Source Storage Class: Name of the source storage class.
    • Target Storage Class: When there is a storage class on the target cluster, the system automatically matches the source and the storage class, and you can also change the mapping relationship. When there is no storage class on the target cluster, the value of Target Storage Class is Unmatched. Then, you need to click "No storage class available for recovery in the target cluster?" and create a storage class as prompted. For more information, please refer to Create a storage class.
  5. After setting the parameters, click OK. The created recovery plan is displayed in the list.

    common:NOTE

    Each recovery plan uses 1 protected application. On the Overview page, click Usage Records in Subscription to view the protected applications used by recovery plans.

Create a storage class

When there is no storage class on the target cluster, perform the following steps to create one.

  1. Create a YAML file, for example, sc.yaml.

    apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: standard provisioner: kubernetes.io/aws-ebs parameters: type: gp3 reclaimPolicy: Retain allowVolumeExpansion: true mountOptions: - debug volumeBindingMode: Immediate

    common:NOTE

    Content in the YAML file is for reference only, and you need to customize it based on your actual situation. For more information, please refer to Kubernetes Documentation.

  2. Run the following command to create a storage class:

    kubectl apply -f sc.yaml
  3. Run the following command to check whether the storage class has been successfully created:

    $ kubectl get storageclass NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE local (default) openebs.io/local Delete WaitForFirstConsumer false 24h standard kubernetes.io/aws-ebs Retain Immediate true 21s

KubeSphere ®️ © QingCloud Technologies 2022