更新快照位置 Velero Azure

Update Snapshot Location Velero Azure

目前已启动 velero,运行 运行良好。我遇到的唯一问题是卷的快照是在与原件相同的区域创建的,这有点违背了灾难恢复的目的。这个标志

--snapshot-location-config

没有区域参数。我知道默认快照位置有一个配置

volumesnapshotlocations.velero.io "default"

有谁知道如何修改默认值以便我可以将快照放入新区域?

不支持从主要区域到其他区域创建快照。
托管磁盘的 Azure zone-redundant 快照和映像具有不错的 99.9999999999%(12 个 9)持久性。一个区域中的可用区通常在物理上是分开的,即使中断影响一个可用区,您仍然可以从冗余可用区访问您的数据。

但是,如果您担心会影响数平方公里(一个区域中的多个区域)的灾难,您可以手动将快照移动到不同的区域,甚至可以自动化该过程。 Here 是一个指南。

--snapshot-location-config doesn't have arg for region

--snapshot-location-config 不会创建存储,您必须自己创建。您可以指定不同的区域、不同的 Azure 订阅,甚至不同的提供商,例如 AWS。

对于 Azure,请按照说明 here 创建存储容器。

如果您的提供商支持区域配置(Azure 不支持 - 请参阅 Volume Snapshot Location Config doc and Backup Storage Location Config doc),则可以使用 --config 进行配置,例如--config region=us-west-2。检查您的提供程序插件以查看是否支持不同的区域、键名称是什么以及支持哪些可能的值。

有关使用多个快照和备份位置的示例,请参阅 Velero locations documentation

更新:

尽管 velero snapshot-location create 允许您指定 --provider,但 Limitations/Caveats section of the Location documentation 明确指出仅支持一组凭据,而且 Azure 特别不允许创建不同地区的快照:

Velero only supports a single set of credentials for VolumeSnapshotLocations. Velero will always use the credentials provided at install time (stored in the cloud-credentials secret) for volume snapshots.

Volume snapshots are still limited by where your provider allows you to create snapshots. For example, AWS and Azure do not allow you to create a volume snapshot in a different region than where the volume is. If you try to take a Velero backup using a volume snapshot location with a different region than where your cluster’s volumes are, the backup will fail.

我个人觉得这令人困惑 -- 如何在不指定凭据的情况下使用不同的提供商?无论如何,似乎无法在 Azure 的不同区域存储快照。