请让我知道我错在哪里!
已使用此命令通过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.0
cat minio.凭据
[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备份-归档,但仍然没用
2条答案
按热度按时间km0tfn4u1#
这是你的问题的根源:
--bucket backup-archive/eks-cluster-backup/prod-eks-cluster/
.错误显示:
must not contain a '/'
.这意味着它不能在bucket名称中间包含斜杠(前导/尾随斜杠已被删除,因此这不是问题)。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/
.r7knjye22#
提供对velero服务帐户中注解的角色的s3fullaccess