Skip to main content
Version: latest

Backup and Restore

Palette allows you to create backups at the workspace-level. A workspace backup may include any or all namespaces included in the workspace, across every cluster in the workspace. The backup feature for workspaces uses the same Velero-based approach as regular cluster backups and are subject to the same limitations. For more information, refer to Cluster Backup and Restore.

The backup files will be stored in a backup location you configure. Each cluster will have its own backup files. When you delete a workspace, the backup files will not be deleted.

Create a Workspace Backup

Backing up a workspace creates a backup file for every cluster in your workspace. Each cluster backup file will contain all Kubernetes objects as well as volumes in the namespaces selected.

Prerequisites

  • You have configured at least one backup location for cluster backups. Refer to Add Backup Location using Static Credentials.

  • You are logged in as a Palette user that has the permission to back up workspaces. For more information, refer to Permissions.

  • The clusters in the workspace you want to backup are healthy and available. Unhealthy clusters will not be backed up.

  • If you want to include volume snapshots in the backup, ensure that your CSI driver supports volume snapshots. For more information about volume support, review the CSI pack README for your CSI driver in use. Refer to the Volume Snapshots section for more information.

    warning

    Ensure that manifests.volume-snapshot-class.deletionPolicy is set to the Retain value if you have configured Volume Snapshot Controller as a layer in your cluster profile. This setting allows volume snapshot content to be retained when volume snapshots are deleted, facilitating backup and restore functionality.

    volume-snapshot-class:
    create: true
    name: "spectro-volume-snapshot-class"
    driver: ""
    deletionPolicy: "Retain"

    Additionally, you must add the following snippet under the manifests.volume-snapshot-class field if you are using Portworx as your CSI layer on a cluster deployed to a MAAS environment. These labels ensure that the Volume Snapshot Controller pack installs correctly.

    extraLabels:
    pod-security.kubernetes.io/enforce: privileged
    pod-security.kubernetes.io/audit: privileged
    pod-security.kubernetes.io/warn: privileged

Procedure

  1. Log in to Palette.

  2. In the drop-down Menu at the top of the page, choose the project that has your workspace.

  3. On the left Main Menu, click Workspaces.

  4. Click on the workspace you want to back up.

  5. Click Settings in the upper-right corner.

  6. Click Schedule backups.

  7. Fill in the following basic information about your scheduled backups.

    ParameterDescription
    Backup prefixThe prefix to your backup file names.
    Select backup locationSelect a location to store your backup files.
    Backup scheduleConfigure a schedule for your backups.
    Select expiryThe period for which your backup files are kept. Backup files past the expiry date are deleted automatically.
    Include all disksSelect this checkbox if you want to include all the disks in the backup.
    Include cluster-wide resourcesCluster wide resources are resources that are not namespaced but are scoped to the whole cluster, such as cluster roles. Auto option includes persistent volumes that are linked to claims within the selected namespaces, but exclude other cluster-wide resources.
  8. Enter the namespaces you want to back up.

  9. Select the clusters you want to back up.

  10. Click Save Changes.

The backup process will take some time ranging from 15 minutes to hours depending on the scope of the backup.

Validate

  1. Log in to Palette.

  2. In the drop-down Menu at the top of the page, choose the project that has your workspace.

  3. On the left Main Menu, click Workspaces.

  4. Click on the workspace you backed up.

  5. Click on the Backups tab.

  6. Confirm that your backup is in progress or completed.

Restore a Workspace Backup

Restoring a workspace will restore the selected namespaces in every cluster that is currently in the workspace to the same state from which the backup was created. The clusters being restored must be healthy and reachable, because the restore process relies on access to the Kubernetes API. If you have deleted a cluster from the workspace, the deleted cluster will not be restored.

Prerequisites

  • You have created a backup file for the workspace.

  • You are logged in as a Palette user that has the permission to restore workspaces. For more information, refer to Permissions.

  • The clusters you want to restore are healthy and available.

Procedure

  1. Log in to Palette.

  2. In the drop-down Menu at the top of the page, choose the project that has your workspace.

  3. On the left Main Menu, click Workspaces.

  4. Click on the workspace you want to restore.

  5. Click on Backups to switch to the backup tab.

  6. Click on a backup file you want to restore from.

  7. You have the following options for restoring the backup.

    OptionDescription
    Include Cluster ResourcesCheck the box to restore all the cluster scoped resources.
    Preserve Node PortsCheck the box to preserve ports for the node port service in the cluster.
    Restore PVsCheck the box to restore the persistent volumes.
  8. Click Restore Backup.

Validate

  1. Log in to Palette.

  2. In the drop-down Menu at the top of the page, choose the project that has your workspace.

  3. On the left Main Menu, click Workspaces.

  4. Click on the workspace you restored.

  5. Ensure that the result of the restore was successful.