Introduction
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.
On-demand backup: On-demand backup only contains full data, which can also be called full 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 backup tool, and thus is recommended.
Scheduled backup: You can specify retention time, backup method, time, and other parameters to customize your backup schedule. Or you can backup your data automatically by log. Log backup uses the incremental log files generated by backing up the database, such as MySQL BinLog and PostgreSQL WAL, and it can also be called incremental backup. Point-in-time recovery (PITR) relies on log backup.
As for the restore function, KubeBlocks supports restoring data from the backup set.
The backup and restore function for different database engines varies:
Engine | Scheduled Backup | Real-time Backup | Snapshot Backup | Datafile Backup | Log Backup | Full Backup | PITR | Data Compression |
---|---|---|---|---|---|---|---|---|
PostgreSQL | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
ApeCloud MySQL | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
MongoDB | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Redis | ✅ | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ |
Prometheus | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ |
Nebula | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ |
Milvus | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ |
Qdrant | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ |
Weaviate | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ |