Why can't I sync to B2 encrypted?

I’m trying to sync to Backblaze B2 with encryption. I’m using 1.36 on Linux. I can sync without encryption, but the problem comes in when I try using encryption.

First I created a bucket on B2 using the web interface. However when I tried reading the listing (rclone lsd B2:) it didn’t display it, because the bucket name wasn’t encrypted. So I figured out what the directory name should be in the encrypted format…so now I have this seemingly random string of letters, so I renamed the bucket to it, and did a “lsd” and there it is, the unencrypted name. Let’s say the unencrypted bucketname is “bucket”.

But I can’t use it. If I try “rclone sync /dirname B2:bucket” it responds with:

2017/05/14 20:46:12 ERROR : Attempt 1/3 failed with 1 errors and: failed to create bucket: bucketName is required (400 bad_json)
2017/05/14 20:46:12 ERROR : Attempt 2/3 failed with 1 errors and: failed to create bucket: bucketName is required (400 bad_json)
2017/05/14 20:46:13 ERROR : Attempt 3/3 failed with 1 errors and: failed to create bucket: bucketName is required (400 bad_json)
2017/05/14 20:46:13 Failed to sync: failed to create bucket: bucketName is required (400 bad_json)

I’ve tried every variation of the command I can think of. This works just with with Amazon Cloud Drive. What am I doing wrong?

(bump)

Does anyone have examples of how they set up B2 with encryption? I can sync files to the B2 remote that isn’t encrypted, but nothing works with the crypt remote.

For the record, I have successfully configured ACD crypt so I know it can be done.

You need to use b2:bucket as your remote - https://rclone.org/crypt/

Note that unless you want encrypted bucket names (which are difficult to manage because you won’t know what directory they represent in web interfaces etc), you should probably specify a bucket, eg remote:secretbucket when using bucket based remotes such as S3, Swift, Hubic, B2, GCS.

That should help!

1 Like

Ahh, ok, I did have it that way previously, but then got this error, as I do now:

rclone sync -v /directory B2:
2017/05/17 09:10:58 INFO : Encrypted B2 bucket (redacted bucketname): Modify window is 1ms
2017/05/17 09:11:00 ERROR : (redacted filename) : Failed to copy: invalid character ‘<’ looking for beginning of value
2017/05/17 09:11:00 ERROR : (redacted filename): Failed to copy: invalid character ‘<’ looking for beginning of value
2017/05/17 09:11:01 ERROR : (redacted filename): Failed to copy: invalid character ‘<’ looking for beginning of value

Not finding any info by searching the forum or the web…any help appreciated.

Does your bucket name meet the requirements?

If it does you’ll need to post some log with -vv which might have some clues.

2 Likes

Yay! It’s working.

The bucketname was ok as I created it on Backblaze’s website and it wouldn’t let me call it something disallowed. The problem was a combination of the crypt remote config, and my employer’s firewall was causing the last error I posted. Good now.

1 Like