Using ACK Backup Center for Data Protection and Migration of Kubernetes Persistent Volumes
This guide explains how Alibaba Cloud ACK Backup Center enables data protection, backup, and cross‑cluster migration of Kubernetes Persistent Volumes by leveraging the Data Protection feature, illustrating configuration steps, backup and restore workflows, and practical YAML examples.
In Kubernetes, a PersistentVolumeClaim (PVC) declares the underlying storage needed by a container, and the Container Storage Interface (CSI) allows the application to mount the volume as if it were local storage.
Because application data is critical, regular backups are essential to prevent data loss, support disaster recovery, and enable migration between environments such as development and production.
The ACK Backup Center provides a one‑stop, container‑native disaster‑recovery and migration solution. While the existing "Application Backup" feature backs up both the application and its storage, the new "Data Protection" feature focuses on backing up storage volumes only, which is useful when the cluster already has CI/CD pipelines or when only volume data needs to be preserved.
Data Protection Feature : It backs up PVs, PVCs, and the underlying data, preserving PVC names so applications can re‑attach without modification. The backup can be a one‑time snapshot or a scheduled job, and during restore the system packages PV, PVC, and data together.
The default backup method uses Alibaba Cloud Disk snapshots for cloud‑disk volumes and Alibaba Cloud Backup Service for other volume types. During restore, the Backup Center can convert storage classes (e.g., from NAS to cloud disk) and automatically adjust PVC/YAML definitions to keep names consistent.
Example PVC YAML :
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-disk
namespace: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
storageClassName: alicloud-disk-topology-alltype
volumeMode: Filesystem
volumeName: d-2ze50bonvbinhjxxxxxx
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-nas
namespace: default
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 20Gi
storageClassName: alibabacloud-cnfs-nas
volumeMode: Filesystem
volumeName: nas-4dxxxxxx-xxxx-xxxx-xxxx-4b1b4cxxxxxxThe backup workflow is performed in the ACK console under Operations → Application Backup . Users can create a backup plan or trigger an immediate backup, select the "Data Protection" type, and choose the target namespace (e.g., default ). Three volume‑selection modes are available: all volumes, specific storage‑class volumes, or explicitly selected PVCs.
During restore, the user switches to the target cluster, selects the backup repository, optionally initializes it, and chooses the backup record to restore. The system can also convert storage classes (e.g., NAS → cloud disk) via the advanced configuration.
After a successful restore, the PVCs are recreated with their original names. If the storage‑class conversion is enabled, a NAS PVC can be transformed into a cloud‑disk PVC, demonstrating flexible migration.
Additional YAML snippet showing the snapshot data source used after restore:
dataSource:
apiGroup: snapshot.storage.k8s.io
kind: VolumeSnapshot
name: pvc-disk-volumesnapshot20250320xxxxxxIn summary, the ACK Backup Center’s Data Protection feature offers a reliable way to safeguard Kubernetes volume data, reduce the risk of data loss, and support seamless cross‑cluster or cross‑cloud migrations without requiring application changes.
Alibaba Cloud Infrastructure
For uninterrupted computing services
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.