-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request: add backblaze b2 storage backend #512
Comments
Thanks for the suggestion. |
I'd like to plug my B2 lib, which implements higher-level abstractions and error correction: https://github.com/kurin/blazer In particular, it automatically switches to B2's "large file" API when the file is larger than a certain threshold, allowing uploads of > 5GB. |
Thanks for the hint. It seems you have some experience with backblaze, do they have a test service we can run our CI tests against? How do you test your library? Against the production systems with valid credentials? |
Should be noted that while B2 is dirt-cheap in terms of storage, it isn't per se in terms of retrieval and operations. Doing large frequent backups with restic's current access pattern (where it pulls the indexes/trees from the repo) might be costly. Off-course none of that will matter once there's a local cache for that data. In that case B2 might just be the most attractive option available for remote storage. |
https://www.backblaze.com/b2/cloud-storage-pricing.html says 1GB egress is free per 24 hrs. Shouldn't that be plenty enough for the index data? |
Backblaze doesn't have a test instance. I'm implementing one myself to test my lib against, since my integration tests have some limits they can't reasonably reach (e.g. credential auth times out after 24 hours). I'll probably get that mostly feature complete in the next few weeks. |
A potential b2 backend still needs some work and we need to find a strategy for testing. I've created an account with Backblaze and submitted a request for a sponsored account we can use to run the tests. For using this account to even access the free tier of b2, it will need a phone number to activate two factor authentication, and I'm not (yet) willing to give them my phone number. ;) Let's continue the discussion here. |
fwiw the blazer integration tests are on the order of several hundred MB per test (since I need to push >100MB to b2 to test all the complex stuff) and I don't really notice much in my bill. You can also set hard caps on requests, per RPC type, so that subsequent requests fail. The cap is daily. |
Thanks for the information @kurin. |
FYI: Backblaze won't sponsor a free test account. Maybe I'll experiment a bit with their free tier... |
How is the free test account needed when 1 GB of download per day is free? (Sorry, I must have missed it in the comments above here?) |
I don't think it's necessary any more. I'm currently reworking the backend CI tests so that they use much less data than before (at least for the backends that are tested against a live third-party service). So we can probably just use the free tier. I need to find time to look into this, it's on my list (right after the swift backend). |
Anybody interested in testing it? I'd love to have some feedback! |
I just uploaded 14.738 GiB (51459 items) to B2. This took about 90 minutes. According to the Backblaze "Reports" page this caused about 2700 Edit: Creating a second snapshot of the same, unchanged directory took 22 minutes. It resulted in about 8500 Edit2: Created a third snapshot just now using |
I just uploaded 2 different repos in different buckets. The bucket are 29.5GB and the other 47.5MB. The upload calls actually look about right. The high number of downloads are odd because I've never tried to restore. The 6K list file names is something very bad going on. I tried creating a second snapshot of the small repo with just a couple text files changed and it generated a lot of activity. I ran it again, this time with the debug log and no changes to the repo... The source dir has 866 files and 47MB. After 4 snapshots this bucket/repo only contains 21 files. It should only have needed to call b2_list_file_names once. And I'm still learning about restic, but I'm not sure why it would need to download more than the index? It downloaded from all the data files numerous times. Here is a grep for X-Blazer-Method in the log for the backup run where there were no changes:X-Blazer-Method: b2_authorize_account X-Blazer-Method: b2_list_buckets X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_get_file_info X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_get_upload_url X-Blazer-Method: b2_upload_file X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_get_upload_url X-Blazer-Method: b2_upload_file X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_get_upload_url X-Blazer-Method: b2_upload_file X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_download_file_by_name X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_get_upload_url X-Blazer-Method: b2_upload_file X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_get_upload_url X-Blazer-Method: b2_upload_file X-Blazer-Method: b2_list_file_names X-Blazer-Method: b2_delete_file_version |
In blazer, downloading an object whether in whole or in part will call b2_list_file_names first to populate an internal object with server-side data, akin to stat. I don't remember offhand but I suspect this is to get, among other things, the object size, in order to support ranged reads. I'll explore whether this check can be elided. |
I've pushed a change to blazer that removes the call to b2_list_file_names on every (new) file read; update and see if this helps. |
Oh, awesome! I'll prepare a PR :) |
See #997 |
I've had a chance to test this out; it looks more reasonable on downloads; for a ~250MB restore I get:
of which only a handful are extraneous:
It looks like these 8k reads come from ~60 data files. I don't know the internals of restic, but I bet any improvement in the number of download_file_by_name calls will have to come from some kind of prefetch logic that can read multiple chunks at once. |
Uploads are still going to be 1:1 with list_file_names and the upload calls, because restic calls Attrs for each b2 object before saving to ensure it doesn't exist. I don't see a way around this check, but I can skip this and just call get_file_info, which is class C instead of class B and 10% as expensive. |
Okay I remember why I did it this way.
|
I'll think about dropping the |
I got a workaround in by downloading a single byte :/ download_file_by_name is cheaper than list_file_names. I'm testing it now but it should work. |
|
Hmhm, that's ugly. 😝 Is there maybe a way to upload a file on B2 with |
Nope. New uploads "hide" older uploads. If you upload "foo" to "x", and then "bar" to "x", and then read "x" you'll get "bar". If you then delete "x", and read "x", you'll get "foo". |
Hm, with the restic repository that'll work out just fine. I'd just need to add special code for removing a file, so that it removes all versions. I'll think about it. Can we move this to a new issue? Discussing it in the PR feels wrong. |
Sure. |
So, the discussion is moved to #1000 (yay) |
See https://www.backblaze.com/b2/docs and the go client/bindings at https://github.com/kothar/go-backblaze
The text was updated successfully, but these errors were encountered: