Help! I’m really close to being able to connect Duplicacy w/ Backblaze via the Cloudflare CDN. I hope someone can point out where I might be going wrong.
First, what I’ve done so far:
- I followed the Backblaze document to create a Cloudfare worker to access a private bucket
- Since I already have domains registered at Cloudflare, I setup a custom domain b2 integration
- I created application keys both with [and without]
ListAllBucketNames
, as well as with [and without] write permission; none of these change the behaviour
- Using other forum posts, I’ve verified I can download specific files [eg. “config”] using
curl
- I created a standard b2 storage in Duplicacy-Web, and modified
duplicacy.json
to use b2-custom
- When selecting the storage w/in Duplicacy-Web, it downloads the backup id [there’s only one], but fails to download the list of revisions giving the error –
Failed to list revisions for backup '1' in the storage b2-restore: The storage has not been initialized
- After adding a new b2 storage, but prior to changing the the storage to
b2-custom
, I confirmed I can see all of the revisions when starting a restore [ie. I wanted to verify I was using the correct storage password]
How do I get past this? I’m sure there’s something silly I’ve done [or not done].
I’ll include a bit more of my in depth configuration below. Hopefully I haven’t omitted something important to diagnose.
Cloudflare worker configuration:
B2_APPLICATION_KEY
– encrypted app key from b2
B2_APPLICATION_KEY_ID
– app key id from b2
B2_ENDPOINT
– s3.us-west-004.backblazeb2.com
BUCKET_NAME
– $path
Verifying the worker:
# curl -I https://b2.foo.bar/bucket-name/config
HTTP/2 200
date: Sat, 11 Jan 2025 20:23:10 GMT
content-type: application/octet-stream
content-length: 842
cf-ray: 90079f7e38c92ee4-LAX
cf-cache-status: DYNAMIC
accept-ranges: bytes
cache-control: public
etag: "e1a0dc3f069b722a153322c01c4e04e1"
last-modified: Fri, 20 Jan 2023 15:54:16 GMT
strict-transport-security: max-age=63072000
x-amz-id-2: aNFo1VjHzMzU232X+YRFktjXqYi4wXjIe
x-amz-request-id: 9414948c77dcc029
x-amz-version-id: 4_z24257173d6eecafd855b0012_f116afed4558c2285_d20230120_m155416_c004_v0402000_t0036_u01674230056345
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=aOhgBySmFFTtZwVlvGuqKZgJtacNboW7Kcfnm0DH0Xgq%2FI%2B6jPp1ZZ6SVjjMKVkrJbsiOEf157VuV3QDXs%2FM5RLtjgv7GuSbVDPSrz1yYHPhaIBOzBQU8Jdlls4%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
alt-svc: h3=":443"; ma=86400
server-timing: cfL4;desc="?proto=TCP&rtt=18141&min_rtt=18024&rtt_var=4014&sent=7&recv=9&lost=0&retrans=0&sent_bytes=3373&recv_bytes=801&delivery_rate=231150&cwnd=221&unsent_bytes=0&cid=18cec05abbfe385e&ts=260&x=0"
And, if I look at the downloaded version of config
, it’s starts with duplicacy
and the rest is random bytes [because I use an encryption password on the storage]
One thing I noticed [not sure if this is expected or not], but I can’t seem to list directories. Perhaps this is the crux of the issue? But, then, how to fix?:
# curl https://b2.foo.bar/bucket-name/chunks/
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Error>
<Code>NoSuchKey</Code>
<Message>Key not found</Message>
</Error>
duplicacy.json
storage configuration
{
"name": "b2-restore",
"url": "b2-custom://b2.foo.bar/bucket-name",
"encrypted": true,
"ras_encrypted": false,
"erasure_coding": "",
"credentials": {
"b2_id": "<<BUCKET_APPLICATION_KEY_ID>>",
"b2_key": "<<BUCKET_APPLICATION_KEY>>",
"password": "<<STORAGE_PASSWORD>>"
}
}