KubeBlocks provides the backup and restore function to ensure the safety and reliability of your data. The backup and restore function of KubeBlocks relies on BackupRepo and before using the full backup and restore function, you need to configure BackupRepo first.
KubeBlocks adopts physical backup which takes the physical files in a database as the backup object. You can choose one backup option based on your demands to back up the cluster data on demand or by schedule.
On-demand backup: Based on different backup options, on-demand backup can be further divided into backup tool and snapshot backup.
- Backup tool: You can use the backup tool of the corresponding data product, such as MySQL XtraBackup and PostgreSQL pg_basebackup. KubeBlocks supports configuring backup tools for different data products.
- Snapshot backup: If your data is stored in a cloud disk that supports snapshots, you can create a data backup by snapshots. Snapshot backup is usually faster than a backup tool, and thus is recommended.
Scheduled backup: You can specify retention time, backup method, time, and other parameters to customize your backup schedule.
As for the restore function, KubeBlocks supports restoring data from the backup set.
Follow the steps below to back up and restore your cluster.