Init existing s3 folder - fatal error

Hi,
I’m using restic inside a kubernetes container, and the script I’m using does a simple repo init (on s3) then backup.

However, if I re-launch the container, it fails when doing the init:

“Fatal: create key in repository at s3:s3.amazonaws.com/ failed: repository master key and config already initialized”

I’m not mounting any volumes on this, so I would expect restic to just “re-attach” to the existing bucket, not fail with a fatal error.

Any thoughts on how I could get it to re-use an existing bucket?

Regards,
Andy

This is expected. The repository is already initialized.

Sure. Just don’t run restic init again.

Hi,
Thanks for getting back to me.

Does init do anything locally, or is it just prepping the remote repo (eg, s3 in my case)? I’d assumed there was some local config stored, but maybe not.

Andy

All init does is create the repository structure, including the config file and initial key file. Restic has no local config.

Hi Chris,
Sorry, I thought I’d replied to this.

Ah, that’s great - exactly what I wanted to hear.

Thanks so much for clarifying.

Regards,
Andy