Cluster Restores

As mentioned in Cluster Backups, you can back up clusters by running a backup job either automatically or manually.

Every time a backup job runs–either by associated policies or manually–and completes, it creates a restore point. You can restore your cluster resources and persistent volumes (PVs) in the same cluster or in a different cluster. In either case, you can reuse or change the namespaces.

Restriction: The Free Service Plan has the following limitations:

  • Backing up persistent volumes to CloudCasa is not available for the Free Service Plan.

  • Backup and snapshot retentions are limited to up to 30 days.

Restoring a cluster backup

In the Restores page for clusters, you can restore a cluster backup by running a restore job. More precisely, create a new restore job and run it so that you can restore the cluster backup in the same cluster, a different existing cluster, or create a new cluster if you are using Microsoft Azure Kubernetes Service (AKS).

Take the following instructions to create and run a restore job:

  1. In the Restores page for clusters, click Define Restore + to open the Restore backup pane.

    In Step 1 of the Restore backup pane, select a cluster to restore.

  2. In Step 2 of the Restore backup pane, select a recovery point to restore.

  3. In Step 3 of the Restore backup pane, configure the following options:

    Select resources to restore

    Select All Protected Namespaces to restore objects in all namespaces. Or, Select Namespaces to specify namespaces and associated objects to restore.

    Select labels (optional)

    Disable this option to restore all objects regardless of labels. Or, enable the option and specifying labels by entering their key-value pairs, for example, “product: life-insurance”.

    Select resource types

    Disable this option to restore all objects regardless of resource types. Or, select some resource types from the following items:

    • clusterrolebindings

    • clusterroles

    • configmaps

    • cronjobs

    • customresourcedefinitions

    • daemonsets

    • deployments

    • endpoints

    • events

    • jobs

    • limitranges

    • namespaces

    • persistentvolumeclaims

    • persistentvolumes

    • pods

    • replicasets

    • replicationcontrollers

    • resourcequotas

    • rolebindings

    • roles

    • secrets

    • serviceaccounts

    • services

    • statefulsets

    • storageclasses

    • volumeattachments

    • volumesnapshotclass.snapshot.storage.k8s.io

    • volumesnapshotcontents.snapshot.storage.k8s.io

    • volumesnapshots.snapshot.storage.k8s.io

    Enable App Hooks

    Enable this option to run shell scripts for objects with specific namespaces after the restore job completes (“post-App Hooks”).

    See also

    For more information about App Hooks, see App Hooks.

    Exclude Persistent Volumes

    Select this option to skip restoring persistent volumes. If you are using the Free Service Plan and restoring a cluster backup, you must enable this option.

    Click Next.

  4. (Optional) If you selected Enable App Hooks in Step 1, select namespaces and post-App Hooks to run after the restore job completes. Click Next.

    Restriction: You cannot run custom shell scripts before the restore job starts (“pre-App Hooks”).

  5. In Step 2 (or Step 3 if you enabled post-App Hooks) of the Restore backup pane, configure the additional options:

    Restore name

    Name the restore job.

    Select destination

    By default, your cluster resources is restored in the same cluster. You can select another cluster to change the restore destination.

    Add prefix/Add suffix

    Add a prefix or suffix to the restored namespaces. For example, if there are namespaces–“sales” and “services”–in the original cluster and you add a suffix, “clare”, to the namespaces, the restore job renames the corresponding namespaces in a restored cluster, “sales-clare” and “services-clare” respectively.

  6. (Optional) If you enabled Create AKS cluster, click Next and you can create a new cluster for Microsoft Azure Kubernetes Service and restore your cluster object in it.

  7. Click Restore to create and run the new cluster restore job.

See the new cluster restore job in the list.

Tip

You can reuse this cluster restore job by clicking Run Now.