1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

fs: make sure backends with additional config have a different name #4996

Backends for which additional config is detected (in the config string
or on the command line or as environment variables) will gain a suffix
`{XXXXX}` where `XXXX` is a base64 encoded md5hash of the config
string.

This fixes backend caching with config string remotes.

This much requested feature now works properly:

    rclone copy -vv drive,shared_with_me:file.txt drive:
This commit is contained in:
Nick Craig-Wood
2021-03-10 14:10:03 +00:00
parent 3dbef2b2fd
commit a12b2746b4
3 changed files with 68 additions and 2 deletions

View File

@@ -285,6 +285,31 @@ does not work on Windows.)
rclone copy ':http,url="https://example.com":path/to/dir' /tmp/dir
#### Connection strings, config and logging
If you supply extra configuration to a backend by command line flag,
environment variable or connection string then rclone will add a
suffix based on the hash of the config to the name of the remote, eg
rclone -vv lsf --s3-chunk-size 20M s3:
Has the log message
DEBUG : s3: detected overridden config - adding "{Srj1p}" suffix to name
This is so rclone can tell the modified remote apart from the
unmodified remote when caching the backends.
This should only be noticeable in the logs.
This means that on the fly backends such as
rclone -vv lsf :s3,env_auth:
Will get their own names
DEBUG : :s3: detected overridden config - adding "{YTu53}" suffix to name
### Valid remote names
- Remote names may only contain 0-9, A-Z ,a-z ,_ , - and space.