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.
hostPath
PersistentVolumes are not supported.In the left navigation bar, click Clusters > Backup and Recovery.
Switch to the Backup Management tab.
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.
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.
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.
After configuring the basic information, click Next.
Back up application resources under the selected namespaces.
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.
Select one or more Namespaces to be backed up.
When selecting Backup Kubernetes resources and Persistent Volume Claims, the Persistent Volume Claims column lists all PVCs in the namespace.
Click Next.
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.
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.
If required, configure custom hooks to run during the backup process.
Manually execute a created schedule (including those with periodic rules). Each execution generates a new backup record.
On the left navigation bar, click Clusters > Backup and Recovery.
Switch to the Backup Management tab.
Click Execute Backup on the right of the schedule, then confirm.
Manually export the backup task log for a specified schedule.
Log export is not supported while the backup task is in progress.
Procedure
On the left navigation bar, click Clusters > Backup and Recovery.
Switch to the Backup Management tab.
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.