Skip to main content
Version: 2.7

Cross-region backup and restore

Portworx Backup supports back up and restore of data across regions. This enables backing up CSI snapshots, NFS shares, and so on in one region and restoring them in another region.

Cross-region backup and restore in GKE cloud provider

The Portworx Backup native driver supports cross-region backup and restore of data for GKE cloud provider. So, there is no additional configuration needed to enable cross region backup and restore.

Cross-Zone backup and restore on Azure

This section outlines detailed steps to configure CSI (Container Storage Interface) backup and restore with Portworx Backup on Azure, using a Kubernetes cluster distributed across multiple zones. It also includes guidance on configuring Azure clusters, both within a single region and across all available zones. Following these steps will help protect and maintain the integrity of crucial data in your Kubernetes environment.

Prerequisites

  • Access to an Azure account with permissions to create and manage resources

  • A Kubernetes cluster deployed on Azure with Portworx Backup installed with necessary configuration

  • A stateful application ready to be backed up and restored using Azure Disk or Azure File storage solutions

  • Knowledge of Kubernetes concepts and administrative tasks

Configure CSI backup and restore using Azure

To take a CSI backup and then restore on Azure cluster:

  1. Configure Azure cluster with the service principle and then add an Azure cluster by following the instructions specified in the following sections:

  1. On the Portworx Backup cluster, verify Portworx Backup installation:

    • Use the following command to ensure that Portworx Backup is installed and configured correctly on your Kubernetes cluster:

      kubectl get pods -n px-backup
    • Ensure all Portworx pods are in the Running state.

  2. Configure your backup environment, ensure that the backup configuration is applied correctly:

    • Install Azure Disk CSI, if not already done

    • Set up a Storage Class for either Premium or Standard ZRS with the following parameters:

      apiVersion: storage.k8s.io/v1
      kind: StorageClass
      metadata:
      name: managed-csi-zrs
      provisioner: disk.csi.azure.com
      parameters:
      skuName: StandardSSD_ZRS # or Premium_ZRS
      reclaimPolicy: Delete
      volumeBindingMode: WaitForFirstConsumer
      allowVolumeExpansion: true
    • Make sure you have VolumeSnapshotClass configured with following parameters on your backup application cluster. Specify Azure region in which Azure disk will be created, and ensure that region name contains only lower-case letters or digits.

      apiVersion: snapshot.storage.k8s.io/v1
      kind: VolumeSnapshotClass
      metadata:
      name: csi-azuredisk-vsc
      driver: disk.csi.azure.com
      deletionPolicy: Delete
      parameters:
      resourceGroup: EXISTING_RESOURCE_GROUP_NAME # optional, only set this when snapshot is not taken in the same resource group as agent node
      incremental: "true" # available values: "true"(by default), "false"
      location: <eastus2>, <westus>, <etc.>
      note

      From version 1.26.4, you can take cross-region snapshots by setting the location parameter to a different region than the current cluster. For example:

       apiVersion: snapshot.storage.k8s.io/v1
      kind: VolumeSnapshotClass
      metadata:
      name: csi-azuredisk-vsc
      driver: disk.csi.azure.com
      deletionPolicy: Delete
      parameters:
      resourceGroup: EXISTING_RESOURCE_GROUP_NAME # optional, only set this when snapshot is not taken in the same resource group as agent node
      incremental: "true" # available values: "true"(by default), "false"
  3. In the Portworx Backup web console, set up and test cross-region backups. Validate the backup and restore functionality to ensure it works as expected:

    • Perform a manual or schedule backup of your PVC or namespace containing your stateful application.

    • Verify that the backup is completed successfully.

    • Simulate a data loss scenario by deleting some data.

    • Perform a restore operation to recover the deleted data. Use the Portworx Backup CLI or UI to initiate the restore process.

Was this page helpful?