Migrate from B2 backend to S3 api

Since Preparing a new repository — restic 0.14.0 documentation

Is it possible to migrate a repo from b2: to s3: without losing any content or restic ability to detect last snapshots to backup from?

Thanks.

As I understand it, restic repo format maps to prefixes in b2 and s3 alike. So can try accessing your b2 using the s3 endpoint. If restic check —read-data works, you can just copy your repo using vanilla s3 commands.

Then there‘s restic copy which copies snapshots between repos (caveats apply, checks the docs).

Disclaimer: haven‘t tried that myself. Be careful, it‘s your backup.

It should be sufficient to just change repository url. I’m not aware of any reason why switching from b2: to s3: shouldn’t work.

Great, i’ll try it and report back :+1:

It might be not possible if B2 bucket is old. For some reason Backblaze decided to support S3 endpoints only for ‘new’ buckets (created after S3 API was introduced).

If bucket is not compatible you’ll need to create new bucket and move files to them (probably it’s possible to do without downloading, but I’m not sure)

Simply switching from b2: to s3: did it.

1 Like