数据备份工具对比

选择合适的备份工具是备份策略的关键。

工具对比

工具类型平台主要功能
VeleroK8s 备份K8s集群备份、迁移
Restic通用备份跨平台增量备份、去重
Borg通用备份Linux压缩、去重
Duplicati通用备份跨平台加密、云存储
xtrabackupMySQL 备份MySQL在线热备

Velero 使用示例

# 安装 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

本章总结

核心要点

  1. 根据平台选择工具:K8s 用 Velero,数据库用专用工具
  2. 考虑备份功能:增量、去重、加密
  3. 备份要可验证:能备份不代表能恢复