用于aws备份作业的带有velero插件的velero失败



k3s集群。

我使用了velero头盔安装:

helm install vmware-tanzu/velero --namespace velero-minio -f helm-custom-values-minio.yaml --generate-name --create-namespace

helm install vmware-tanzu/velero --namespace velero-aws -f helm-custom-values-aws.yaml --generate-name --create-namespace

自定义舵值:

helm-custom-values-minio.yaml

configuration:
provider: aws
backupStorageLocation:
bucket: k3s-backup
name: minio
default: false
config:
region: minio
s3ForcePathStyle: true
s3Url: http://10.10.5.15:9009
volumeSnapshotLocation:
name: minio
config:
region: minio
credentials:
secretContents:
cloud: |
[default]
aws_access_key_id=minioadm
aws_secret_access_key=<password>
initContainers:
- name: velero-plugin-for-aws
image: velero/velero-plugin-for-aws:latest
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /target
name: plugins
snapshotsEnabled: true
deployRestic: true

和头盔-海关价值-ws.yaml

configuration:
provider: aws
backupStorageLocation:
name: aws-s3
bucket: k3s-backup-aws
default: false
provider: aws
config:
region: us-east-1
s3ForcePathStyle: false
volumeSnapshotLocation:
name: aws-s3
provider: aws
config:
region: us-east-1
credentials:
secretContents:
cloud: |
[default]
aws_access_key_id=A..............MJ
aws_secret_access_key=qZ79rA/yVUq2c................xnIA
initContainers:
- name: velero-plugin-for-aws
image: velero/velero-plugin-for-aws:latest
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /target
name: plugins
snapshotsEnabled: true
deployRestic: true

velero备份作业:

velero create backup k3s-mongodb-restic-minio --include-namespaces mongodb --default-volumes-to-restic=true --storage-location minio -n velero-minio
velero create backup k3s-mongodb-restic-aws --include-namespaces mongodb --default-volumes-to-restic=true --storage-location aws-s3 -n velero-aws

他们都失败了:

Restic Backups:
Failed:
mongodb/mongodb-cluster-0: agent-scripts, data-volume, healthstatus, hooks, logs-volume, mongodb-cluster-keyfile, tmp
mongodb/mongodb-cluster-1: agent-scripts, data-volume, healthstatus, hooks, logs-volume, mongodb-cluster-keyfile, tmp
time="2022-10-17T17:42:32Z" level=error msg="Error backing up item" backup=velero-minio/k3s-mongodb-restic-minio error="pod volume backup failed: running Restic backup, stderr=Fatal: unable to open config file: Stat: The Access Key Id you provided does not exist in our records.nIs there a repository at the following location?ns3:http://10.10.5.15:9009/k3s-backup/restic/mongodbn: exit status 1" error.file="/go/src/github.com/vmware-tanzu/velero/pkg/restic/backupper.go:199" error.function="github.com/vmware-tanzu/velero/pkg/restic.(*backupper).BackupPodVolumes" logSource="pkg/backup/backup.go:417" name=mongodb-cluster-0

velero get backup-locations -n velero-aws
NAME     PROVIDER   BUCKET/PREFIX    PHASE       LAST VALIDATED                  ACCESS MODE   DEFAULT
aws-s3   aws        k3s-backup-aws   Available   2022-10-17 14:12:46 -0400 EDT   ReadWrite 

velero get backup-locations -n velero-minio
NAME    PROVIDER   BUCKET/PREFIX   PHASE       LAST VALIDATED                  ACCESS MODE   DEFAULT
minio   aws        k3s-backup      Available   2022-10-17 14:16:25 -0400 EDT   ReadWrite  

velero备份部分可以正常工作,但restic在我的所有工作中都失败了(mongodb是唯一的例子(。看起来restic无法为我的nfs-pvc创建快照。

我做错了什么?

看起来velero不适用于多个安装,至少restic部分失败了(在我的情况下,名称空间velero-awsvelero-minio中有两个实例(。所以,我只安装了一个velero实例来与minio一起工作。

已从备份作业配置中删除--default-volumes-to-restic=true

使用了带有restic集成的选择性pod卷备份。每个有pvc体积的吊舱都需要注释,如下所示:

kubectl -n mongodb annotate pod/mongodb-cluster-0 backup.velero.io/backup-volumes=logs-volume,data-volume

我没有尝试过velero聚氯乙烯观察者,可能它工作得很好

现在备份工作时没有任何错误。

相关内容

  • 没有找到相关文章

最新更新