gilbertchen
a0a07d18cc
Merge pull request #589 from fracai/b2_download_url
...
support downloading from a custom URL pointed at B2
2020-03-05 22:00:53 -05:00
Gilbert Chen
a6ce64e715
Fixed handling of repository ids with spaces in the b2 backend
...
Usually a repository id should not contain spaces or other non-alphanum
characters, but if it does we should be able to handle it correctly. This
commit fixes the b2 backend to convert file names in a proper way.
2020-03-05 14:45:09 -05:00
Arno Hautala
499b612a0d
moving download url config from a key to the storage url pattern
2020-02-25 20:53:19 -05:00
Arno Hautala
46ce0ba1fb
support downloading from a custom URL pointed at B2
2020-02-22 22:12:36 -05:00
Gilbert Chen
e02041f4ed
Increase the number of retries for the b2 backend from 10 to 15
...
Retrying 10 times means a retry window of about 5 minutes, which might be too
short. 15 corresponds to about 10 minutes.
2019-11-23 15:28:03 -05:00
Philipp Bandow
5821cad8c5
Add BucketName to API call in FindBucket function
2019-06-28 12:15:45 +02:00
Gilbert Chen
045be3905b
Better handling of B2 authorization failures
...
This commit fixed 2 issues wrt Backblaze B2 authorization:
* every thread may call b2_authorize_account at the same time when there
are 401 errors
* if B2 has a login outage, then all threads will call b2_authorize_account
repeatedly without delay
A simple solution is to limit one b2_authorize_account call to once every
30 second regardless of how many threads there are. If the call to
b2_authorize_account is not allowed, the random exponential backoff will
be performed.
2019-06-13 22:43:07 -04:00
Gilbert Chen
57a408a577
Rework the Backblaze B2 backend
...
* All APIs include UploadFile are done via the call() function
* New retry mechanism limiting the maximum backoff each time to 1 minute
* Add an env var DUPLICACY_B2_RETRIES to specify the number of retries
* Handle special/unicode characters in repositor ids
* Allow a directory in a bucket to be used as the storage destination
2019-04-30 23:31:57 -04:00
Michael Cook
0762c448c4
gofmt -s
2018-12-29 13:20:10 +01:00
Gilbert Chen
674d35e5ca
Get accountID from b2_authorize_account and supply it to b2_list_buckets
2018-09-08 20:21:49 -04:00
Gilbert Chen
e5beb55336
Replace spaces in file paths with %20 (for repository ids with spaces)
2018-01-20 22:59:41 -05:00
Gilbert Chen
61fb0f7b40
Fixed a typo in a log message
2018-01-08 14:42:59 -05:00
Gilbert Chen
2f6287a45d
readCloser may be nil if the file to be searched doesn't exist
2017-10-05 22:22:55 -04:00
Arno Hautala
be89d8d0dc
treat 404 as file missing instead of generic error
2017-10-03 00:10:57 -04:00
Arno Hautala
f044d37b28
goimports
2017-10-02 02:08:34 -04:00
Arno Hautala
04debec0a1
request last byte (handles empty files), handle 404 and 416 errors, response header error checking
2017-10-02 02:04:30 -04:00
Arno Hautala
0784644996
goimports
2017-10-01 23:08:25 -04:00
Arno Hautala
f57fe55543
cleanup, simplified ListFileNames invoke of "call"
2017-10-01 23:07:25 -04:00
Arno Hautala
be2c3931cd
pass in the http request method rather than switching on input type
2017-10-01 21:16:45 -04:00
Arno Hautala
6c96c52a93
Merge branch 'master' of github.com:gilbertchen/duplicacy into b2-efficiency
...
resolved conflicts due to new goimports formatting
2017-09-21 21:22:06 -04:00
Arno Hautala
2c2884abfb
fixes to fetching file info via b2_download_file_by_name
2017-09-21 03:18:08 -04:00
Gilbert Chen
923cd0aa63
Run goimports on all source files
2017-09-20 23:07:43 -04:00
Arno Hautala
b3d1eb36bd
fixes and filling out calls to b2_client.call
2017-09-20 22:38:35 -04:00
Arno Hautala
3c03b566ae
request b2_download_file_by_name if listing a single file with no versions
2017-09-20 20:54:39 -04:00
Gilbert Chen
7f04a79111
Replace Fair Source 5 with our own free-for-personal-use license
2017-07-13 23:33:14 -04:00
Gilbert Chen
2cbb72c2d0
Handle 3xx status codes from B2
2017-07-04 15:14:15 -04:00
Gilbert Chen
42337d84c3
Move source files into src for a better looking front page
2017-06-07 14:04:11 -04:00
Gilbert Chen
4a1dc01ff4
Reorganize src directory
2017-06-02 16:33:36 -04:00
Gilbert Chen
bdf017e552
Move source files to src/
2017-05-23 10:25:00 -04:00