Can't add backblaze repo
Note: if you have a question or need support please post in the discussions area.
Describe the bug Every time I add a repo to backrest, I get this error. Trying to do this with backblaze.
To Reproduce
- Add backup repo as back blaze.
- Get error
Expected behavior Backblaze repo gets added.
Screenshots
Platform Info Docker Client: Docker Engine - Community Version: 28.0.1 Context: default Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.21.1 Path: /usr/libexec/docker/cli-plugins/docker-buildx compose: Docker Compose (Docker Inc.) Version: v2.33.1 Path: /usr/libexec/docker/cli-plugins/docker-compose
OS Ubuntu 22.04 Rockchip ARM64
Additional context
+1.
Would seem that a 500 error is being returned from the below:
Request:
http://<address>:9898/v1.Backrest/CheckRepoExists
Response:
{
"code": "unknown",
"message": "command \"/bin/restic cat config -o sftp.args=-oBatchMode=yes\" failed: signal: killed"
}
Request:
http://<address>:9898/v1.Backrest/AddRepo
Response:
{
"code": "unknown",
"message": "failed to init repo: init failed: command \"/bin/restic init --json -o sftp.args=-oBatchMode=yes\" failed: command \"/bin/restic init --json -o sftp.args=-oBatchMode=yes\" failed: exit status 1\nOutput:\nFatal: create repository at b2:<NAME> failed: Fatal: unable to open repository at b2:<NAME>: context deadline exceeded\n\n"
}
Edit: The same seems to happen with b2: and s3: type URLs:
b2:<NAME>
s3:s3.eu-central-003.backblazeb2.com/<NAME>
Testing on the previous version of Backrest, I'm not able to reproduce this behavior. 500 error is unexpected.
The restic cat command failing is a health check to verify that backrest can access the repository before trying to create a new one, etc.
Are you providing necessary environment variables e.g. AWS_SECRET_ACCESS_KEY, etc?
Hey @garethgeorge
Yeah, when trying both b2: and s3: URLs, the relevant B2_ and AWS_ environment variables from the docs are added using the keys provided in Backblazes' Application Keys page.
Hey there, just wanted to pipe in and say that I'm running into this issue as well. When I try to add a B2 repository using the S3 API (an s3:// URL), when I Test Connection, it spins for a little bit, and then pops up with this error:
Check error: : [unknown] command "/bin/restic cat config -o sftp.args=-oBatchMode=yes" failed: signal: killed
Any advice would be appreciated!
Hi, I've been having the same issue, I downgraded to v1.7.2, but also had the same issue with not being able to add the Backblaze repos. For context, I am using Portainer to execute the provided Docker compose stack.
What solved it for me was debugging whether I could resolve the Backblaze server using nslookup. I could on my host machine, but not when I was inside the container. It was trying to resolve through Docker's internal DNS (127.0.0.1), not any Internet facing one. So, I added the following to my Docker compose file and now I can add my Backblaze bucket.
dns:
- 8.8.8.8
- 8.8.4.4
Hope that helps!
Edit: and if this is a dumb solution and if there are any better ones, please let us know!
This is a good callout-- it didn't occur to me but the fatal: signal: killed is probably restic hitting the timeout on the command, I should update the error message to clearly differentiate whether 'restic died' or 'restic was cancelled'.
I think that its very likely that something network related and setup dependent is the issue. Backblaze is what I use personally for my NAS backups with the stock backrest docker image that I publish.
Just wanted to report back, I took another look at my Backrest setup today after a few months away (intending to try the DNS trick mentioned above) and it randomly decided to work, even without the DNS fix.
I'm running Backrest via Portainer running on TrueNAS Scale.