Inconsistent treatment of Team Drive names with trailing space

What is the problem you are having with rclone?

When generating a Team Drive config list using rclone backend drives $DRIVE: -o config, if one of the Team Drive names has a trailing space character, then the AllDrives: section contains an alias that does not resolve. The definition of the offending Team Drive includes the trailing space, but this appears to be silently ignored during normal usage. The alias reference in AllDrives also contains the trailing space in both the folder and drive names, but this reference is not followed correctly when AllDrives: is used on the command line.

Run the command 'rclone version' and share the full output of the command.

rclone v1.60.1-DEV

  • os/version: ubuntu 20.04 (64 bit)
  • os/kernel: 5.4.0-99-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.19.4
  • go/linking: dynamic
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

> rclone backend drives GDRIVE_TEMPLATE: -o config >> /root/.config/rclone/rclone.conf
> rclone sync Marketing: $LOCALDISK/Marketing/
(success)
> rclone sync AllDrives: $LOCALDISK/
Failed to create file system for "AllDrives:": failed to create upstream "Marketing :": didn't find section in config file

The rclone config contents with secrets removed.

[GDRIVE_TEMPLATE]
type = drive
client_id = REDACTED
client_secret = REDACTED
scope = drive
token = {REDACTED}
team_drive = REDACTED
root_folder_id =


[Administration]
type = alias
remote = GDRIVE_TEMPLATE,team_drive=REDACTED,root_folder_id=:

[Marketing ]
type = alias
remote = GDRIVE_TEMPLATE,team_drive=REDACTED,root_folder_id=:

[Product]
type = alias
remote = GDRIVE_TEMPLATE,team_drive=REDACTED,root_folder_id=:

[AllDrives]
type = combine
upstreams = "Administration=Administration:" "Marketing =Marketing :" "Product=Product:"

A log from the command with the -vv flag

2023/01/12 10:35:28 DEBUG : rclone: Version "v1.60.1-DEV" starting with parameters ["rclone" "sync" "-vv" "AllDrives:" "/REDACTED/"]
2023/01/12 10:35:28 DEBUG : Creating backend with remote "AllDrives:"
2023/01/12 10:35:28 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2023/01/12 10:35:28 DEBUG : Creating backend with remote "Product:"
2023/01/12 10:35:28 DEBUG : Creating backend with remote "Administration:"
2023/01/12 10:35:28 DEBUG : Creating backend with remote "GDRIVE_TEMPLATE,team_drive=REDACTED,root_folder_id=:"
2023/01/12 10:35:28 DEBUG : Creating backend with remote "Marketing :"
2023/01/12 10:35:28 DEBUG : Creating backend with remote "GDRIVE_TEMPLATE,team_drive=REDACTED,root_folder_id=:"
2023/01/12 10:35:28 DEBUG : GDRIVE_TEMPLATE: detected overridden config - adding "{Rzwd-}" suffix to name
2023/01/12 10:35:28 DEBUG : GDRIVE_TEMPLATE: detected overridden config - adding "{jVu8S}" suffix to name
2023/01/12 10:35:28 DEBUG : fs cache: renaming cache item "GDRIVE_TEMPLATE,team_drive=REDACTED,root_folder_id=:" to be canonical "GDRIVE_TEMPLATE{Rzwd-}:"
2023/01/12 10:35:28 DEBUG : fs cache: renaming cache item "Product:" to be canonical "GDRIVE_TEMPLATE{Rzwd-}:"
2023/01/12 10:35:28 DEBUG : fs cache: renaming cache item "GDRIVE_TEMPLATE,team_drive=REDACTED,root_folder_id=:" to be canonical "GDRIVE_TEMPLATE{jVu8S}:"
2023/01/12 10:35:28 DEBUG : fs cache: renaming cache item "Administration:" to be canonical "GDRIVE_TEMPLATE{jVu8S}:"
2023/01/12 10:35:28 Failed to create file system for "AllDrives:": failed to create upstream "Marketing :": didn't find section in config file

Hi Andrew,

Looks like this issue fixed in v1.61:

I suggest you try again using the latest version (v1.61.1) from here: https://rclone.org/downloads/

I worked around the issue by renaming the offending drive, but good to see it has been addressed. Thanks!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.