vmware-tanzu / velero

Backup and migrate Kubernetes applications and their persistent volumes
https://velero.io
Apache License 2.0
8.65k stars 1.39k forks source link

"restic repository is not ready" error on backups with Minio and Restic #3668

Open irizzant opened 3 years ago

irizzant commented 3 years ago

What steps did you take and what happened: I have a problem running a backup using Minio as storage backend.

I run the backup with:

velero backup create test --default-volumes-to-restic=true --ttl=24h0m0s

to backup the whole cluster and the backup starts correctly. After the backup completes I see:

NAME                           STATUS            ERRORS   WARNINGS   CREATED                          EXPIRES   STORAGE LOCATION   SELECTOR
test                           PartiallyFailed   140      1          2021-04-07 19:00:15 +0200 CEST   4h        default            <none>

The logs reports:

time="2021-04-07T21:00:29Z" level=error msg="Error backing up item" backup=velero/test error="restic repository is not ready: " error.file="/go/src/github.com/vmware-tanzu/velero/pkg/restic/repository_ensurer.go:144" error.function="github.com/vmware-tanzu/velero/pkg/restic.(*repositoryEnsurer).EnsureRepo" logSource="pkg/backup/backup.go:431" name=restic-vfm7f

I'm not sure what's happening here.

The backup storage location is available:

NAME      PROVIDER   BUCKET/PREFIX   PHASE       LAST VALIDATED                   ACCESS MODE
default   aws        k8s-backups     Available   2021-04-08 14:50:22 +0200 CEST   ReadWrite

What did you expect to happen: The backup completes successfully

The output of the following commands will help us better understand what's going on: (Pasting long output into a GitHub gist or other pastebin is fine.)

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment:

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

zubron commented 3 years ago

Hi @irizzant - Sorry you're having issues with this, and thank you for providing all the logs. Unfortunately, it looks like some of the restic logs that would give us some more information are only printed at the debug log level. Could you please change your Velero deployment to increase the log level using these instructions and run another backup and share the logs? This will give us more details, including the stdout and stderr when running restic commands. Thanks!

irizzant commented 3 years ago

Hi @zubron thanks for the update. Here the updated logs: kubectl logs deployment/velero -n velero logs-velero.txt velero backup logs <backupname> I get An error occurred: timed out waiting for download URL