B2 repo init fail

restic -r b2:bucketname:/ init

says it creates a new repo, but checking my b2 the bucket has 0 bytes.

any ideas?

Can you please log into the Backblaze website and have a look what’s inside the bucket? There’s a button called “Upload/Download” for each bucket in the list, just clicking it gives you a list of dirs/files. There should be a config file and a couple of directories (data, snaphots, keys etc.). Can you see that?

Oh sorry I didn’t clarify that well, I meant 0 bytes from the Backblaze interface, so looking into the files, there are zero files.

But looking into my home folder, I see a directory called: b2:bucketname:/, that is a little odd. It does this consistently, but I don’t know why.

from the docs, this is the syntax:

restic -r b2:bucketname:path/to/repo init

I did the export of account id and application key, not sure what is going wrong here.

Oh, I’m sorry that you ran into this: It seems you used a released version of restic, these do not include support for B2 yet. You need to use the latest master branch and build restic yourself (don’t worry, it’s not hard to do).

We also made sure that this does not happen any more, starting with the next release restic prints an error when it sees an unknown backend type prefix (b2 in this case) that is does not support.

1 Like

Oh thanks for the info, I got it from the ubuntu zesty package manager, is there anything else I need to do besides build in terms of configuration?

Nop, just install Go (at least Version 1.8), run go run build.go and then find the compiled restic binary in the current directory. Done :slight_smile: And yes, restic really is just one statically-linked self-contained binary.

1 Like