请让我知道我的错误在哪里!
已使用以下命令使用velero工具备份AWS EKS群集,但它不起作用:
./velero.exe install --provider aws --bucket backup-archive/eks-cluster-backup/prod-eks-cluster/ --secret-file ./minio.credentials --use-restic --backup-location-config region=minio,s3ForcePathStyle=true,s3Url=s3Url=s3://backup-archive/eks-cluster-backup/prod-eks-cluster/ --kubeconfig ../kubeconfig-prod-eks --plugins velero/velero-plugin-for-aws:v1.0.0cat minio.credentials
[default]
aws_access_key_id=xxxx
aws_secret_access_key=yyyyy/zzzzzzzz
region=ap-southeast-1获取错误:
../kubectl.exe --kubeconfig=../kubeconfig-prod-eks.txt logs deployment/velero -n velero
time="2020-12-09T09:07:12Z" level=error msg="Error getting backup store for this location" backupLocation=default controller=backup-sync error="backup storage location's bucket name \"backup-archive/eks-cluster-backup/\" must not contain a '/' (if using a prefix, put it in the 'Prefix' field instead)" error.file="/go/src/github.com/vmware-tanzu/velero/pkg/persistence/object_store.go:110" error.function=github.com/vmware-tanzu/velero/pkg/persistence.NewObjectBackupStore logSource="pkg/controller/backup_sync_controller.go:168"注意:我已经尝试过--bucket backup-archive,但仍然没有用
发布于 2020-12-20 01:21:36
这就是问题的根源:--bucket backup-archive/eks-cluster-backup/prod-eks-cluster/。
错误显示为:must not contain a '/'。
这意味着它不能在存储桶名称中间包含斜杠(前导/尾部斜杠被修剪掉,所以这不是问题)。来源:https://github.com/vmware-tanzu/velero/blob/3867d1f434c0b1dd786eb8f9349819b4cc873048/pkg/persistence/object_store.go#L102-L111。
如果要将备份命名为存储桶中的备份,可以使用--prefix参数。如下所示:
--bucket backup-archive --prefix /eks-cluster-backup/prod-eks-cluster/。
https://stackoverflow.com/questions/65287543
复制相似问题