数据备份工具对比
选择合适的备份工具是备份策略的关键。
工具对比
Velero 使用示例
本章总结
核心要点:
- 根据平台选择工具:K8s 用 Velero,数据库用专用工具
- 考虑备份功能:增量、去重、加密
- 备份要可验证:能备份不代表能恢复
选择合适的备份工具是备份策略的关键。
| 工具 | 类型 | 平台 | 主要功能 |
|---|---|---|---|
| Velero | K8s 备份 | K8s | 集群备份、迁移 |
| Restic | 通用备份 | 跨平台 | 增量备份、去重 |
| Borg | 通用备份 | Linux | 压缩、去重 |
| Duplicati | 通用备份 | 跨平台 | 加密、云存储 |
| xtrabackup | MySQL 备份 | MySQL | 在线热备 |
# 安装 Velero
velero install \
--provider aws \
--plugins velero/velero-plugin-for-aws:v1.5.0 \
--backup-location-config region=us-east-1 \
--snapshot-location-config region=us-east-1
# 创建备份
velero backup create weekly-backup --schedule "0 2 * * 0"
# 恢复
velero restore create --from-backup weekly-backup核心要点: