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.
The field encryptionVersion in the Chunk struct is supposed to pass the status
of RSA encrytpion from a source chunk to a destination chunk in a copy command.
This field needs to be a 3-state boolean in order to pass the status correctly.
You can now add a key 'filters' in the preferences file that points to the
path of the filters file. If this key is not found in the preferences,
the default location '.duplicacy/filters' is used.
There is a new option '-filters' for the set command that set this key in
the preferences, but you can also edit the file directly.
This fix isn't probably necessary since filepath.Join can now produce UNC
paths too with the latest versions of go. However, we still want to keep
it for consistency.
Using `tmutil listlocalsnapshots` to find the snapshot name we need to use; fallback to `com.apple.TimeMachine.SNAPSHOT_DATE` (same as before) if we can't find it.
This is to support public key encryption in the backup operation. You can use
the -key option to supply the public key to the backup command, and then the
same option to supply the private key when restoring a previous revision.
The storage must be encrypted for this to work.
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.
Azure sometimes disconnect the connection randomly when uploading files. The
returned error was 'broken pipe' but this error is wrapped deep in multiple
levels of errors so we have to check the error string instead.
* 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