Container Service for Kubernetes (ACK) allows you to back up and restore stateful applications deployed in an ACK cluster. This is an all-in-one solution to achieve crash consistency, application consistency, and cross-region disaster recovery for stateful applications in ACK clusters. This topic describes how to use the application backup feature in the console to back up applications, create snapshots, and restore applications.
Prerequisites
Limits
- When you back up an application, the resources in the Deleting state are not backed up.
- If you want to use the Hybrid Backup Recovery (HBR) service, Submit a ticket to apply to be added to the whitelist.
- If you want to use snapshots of disk volumes, you must install the Container Storage Interface (CSI) plug-in of V1.1.0 or later. For more information about how to install the CSI plug-in, see Install and upgrade the CSI plug-in.
- If you want to create snapshots of Apsara File Storage NAS (NAS) volumes, which means that you select alibabacloud-cnfs-nas in the Change StorageClass column of the related persistent volume claim (PVC) when you create a snapshot, you must first create a StorageClass. For more information, see Use CNFS to manage NAS file systems.
Billing
If you use disks, NAS file systems, HBR, or snapshots when you back up an application,
you are billed based on the following rules:
- For more information about the billing of disks, see Elastic Block Storage devices.
- For more information about the billing of NAS, see NAS billing overview.
- For more information about the billing of HBR, see Billing methods and billable items.
- For more information about the billing of snapshots, see Snapshots.
Step 1: Create a backup vault
When you back up applications in an ACK cluster, the backup files are stored in an
Object Storage Service (OSS) bucket. If no backup vault is available when you create
a backup task, you must perform the operations in Step 1. You need to specify only
one backup vault for each ACK cluster.
Note You need to create only one backup vault in the region where your cluster is deployed.
ACK clusters that are deployed in the region can share the specified backup vault.
Step 2: Create a backup task
Step 3: Create snapshots for volumes of CNFS types
If you enable Volume Backup and use storage other than disks to store data when you create a backup task, the
HBR service is used to store the data. You can select to create disk snapshots or
Container Network File System (CNFS) snapshots in the cluster where you want to restore
the application.
Notice If you want to restore the application across clusters, you must perform the following
operations in the cluster to which you want to restore the application.
Step 4: Restore the application and volume
Notice Before you restore the application data, make sure that you have created a snapshot
of the volume that needs to be backed up.