Create Application Backup

Create an application backup schedule to define the scope of data to back up (by namespace), the backup storage location, method, and related parameters. Each run based on the schedule generates a new backup record, enabling automatic backups for application resources in selected namespaces on demand or at a defined frequency.

TOC

Prerequisites

  • The backup and recovery plugin is installed in the current cluster, and a backup repository (S3-compatible) is configured.
  • The backup repository is configured.

Procedure

WARNING
  • To back up application data, include PersistentVolumeClaims (PVCs). PVCs bound to hostPath PersistentVolumes are not supported.
  • To ensure reliability and data integrity, do not back up database data (for example, MySQL-PXC, Redis). Use Data Services for database backups.
  • Avoid reads, writes, updates, and deletes in the namespaces being backed up to prevent drift and inconsistencies after migration.

Basic information

  1. In the left navigation bar, click Clusters > Backup and Recovery.

  2. Switch to the Backup Management tab.

  3. Click Create Backup Policy > Create Application Backup and configure the parameters as follows.

    • Backup Resource Type: Kubernetes Resources includes all Kubernetes resource files in the selected namespaces. PVCs are persistent volume claims used to back up application data bound to persistent volumes. PVCs bound to hostPath volumes are not supported.

      TIP
      • If the storage resource used by your PVC has a Recycle Strategy of Retain, only Kubernetes resources need to be backed up.

      • If the storage resource used by your PVC has a Recycle Strategy of Delete, both Kubernetes resources and PVCs need to be backed up.

    • Backup Repository: Select a repository that has passed connectivity verification, or click Create Backup Repository.

      TIP

      After creating a repository, click OK and Create Application Backup to return and continue, or click Create to return to the repository list to view created repositories.

  4. After configuring the basic information, click Next.

Backup resources

Back up application resources under the selected namespaces.

NOTE
  • Namespaces that have not been imported in the cluster are not displayed. To back up such namespaces, import them into the project first.

  • To ensure reliability and integrity, do not back up database data (for example, MySQL-PXC, Redis). Use Data Services for database backups.

  1. Select one or more Namespaces to be backed up.

    TIP

    When selecting Backup Kubernetes resources and Persistent Volume Claims, the Persistent Volume Claims column lists all PVCs in the namespace.

  2. Click Next.

Method

Configure the backup schedule.

  • Backup once only: Executes immediately after creation. After setting the Backup retention period, backups exceeding the retention period are cleaned up automatically.

  • Scheduled: Set a Backup rule to execute the policy periodically. A crontab expression is supported.

    TIP
    • Use the platform's preset Backup rule templates, then adjust as needed.

    • Recommended minimum frequencies: once per day for Backup Kubernetes resources and Persistent Volume Claims; once per hour for Backup Kubernetes resources.

Advanced configuration

If required, configure custom hooks to run during the backup process.

Relevant operations

Run the backup schedule manually

Manually execute a created schedule (including those with periodic rules). Each execution generates a new backup record.

  1. On the left navigation bar, click Clusters > Backup and Recovery.

  2. Switch to the Backup Management tab.

  3. Click Execute Backup on the right of the schedule, then confirm.

Export backup task logs

Manually export the backup task log for a specified schedule.

TIP

Log export is not supported while the backup task is in progress.

Procedure

  1. On the left navigation bar, click Clusters > Backup and Recovery.

  2. Switch to the Backup Management tab.

  3. Click the Backup Schedule Name to view the backup record, then in the Backup Records area click Export Log on the right of the record.