Rclone Sync server side copy always duplicates google sheets/doc files

What is the problem you are having with rclone?

I am trying sync my two team drives, and it works great except for any file that is a google sheets. Whenever I sync, rclone ends up adding another copy of the google sheets and each time I run rclone sync it adds another one.

What is your rclone version (output from rclone version)

rclone v1.52.2

  • os/arch: windows/amd64
  • go version: go1.14.4

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Windows 10, 64 bit

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

Google Team Drive synced to a backup Google Team Drive.
Both team drives are under the same google account.

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

rclone sync "Academic Resources:" "Academic Resources Backup:" --drive-server-side-across-configs -vv

The rclone config contents with secrets removed.

I used the default configuration for a google drive except I created my own client ID and secret and I set it as a team drive configuration. Both team drives are accessed by the same google account and they both have the same client ID and secret.

[Academic Resources Backup]
type = drive
client_id = CUSTOM ID
client_secret = REMOVED
scope = drive
token = {"access_token":"TOKEN"}
team_drive = REMOVED

[Academic Resources]
type = drive
client_id = CUSTOM ID
client_secret = REMOVED
scope = drive
token = {"access_token":"TOKEN"}
team_drive = REMOVED

A log from the command with the -vv flag

here is a portion of my log: https://pastebin.com/JL8R8jzw

The current file that I was duplicated in that log was called "Astronomy Test - Milton SciOly"
Further down the log (I didn't paste this part), it moves onto a different folder and the "Astronomy Test - redacted redacted.docx" is server side copied.

The main thing that stood out to me was

2020/08/14 22:11:57 DEBUG : Academic Resources/5. Misc/Science Convention/redacted Invitational 2020/Astronomy Test - redacted redacted.docx: Modification times differ by 532h51m25.568s: 2020-07-23 21:15:41.901 +0000 UTC, 2020-08-15 02:07:07.469 +0000 UTC

For some reason the file was marked with a different Modification time

I can't find that in the log to compare since the log has stuff removed.

Oops! I forgot to redact that too. In the log it should be Astronomy Test - redacted

I̶ ̶a̶l̶s̶o̶ ̶f̶o̶u̶n̶d̶ ̶o̶u̶t̶ ̶t̶h̶a̶t̶ ̶i̶f̶ ̶I̶ ̶t̶u̶r̶n̶ ̶o̶n̶ ̶s̶h̶a̶r̶i̶n̶g̶ ̶b̶y̶ ̶l̶i̶n̶k̶ ̶t̶h̶e̶ ̶p̶r̶o̶b̶l̶e̶m̶ ̶w̶o̶n̶'̶t̶ ̶o̶c̶c̶u̶r̶ ̶a̶n̶y̶m̶o̶r̶e̶.̶ ̶I̶ ̶c̶a̶n̶'̶t̶ ̶r̶e̶a̶l̶l̶y̶ ̶d̶o̶ ̶t̶h̶a̶t̶ ̶b̶e̶c̶a̶u̶s̶e̶ ̶t̶h̶a̶t̶ ̶w̶o̶u̶l̶d̶ ̶m̶e̶a̶n̶ ̶I̶ ̶w̶o̶u̶l̶d̶ ̶h̶a̶v̶e̶ ̶t̶o̶ ̶s̶o̶r̶t̶ ̶t̶h̶r̶o̶u̶g̶h̶ ̶a̶l̶l̶ ̶t̶h̶e̶ ̶g̶o̶o̶g̶l̶e̶ ̶s̶h̶e̶e̶t̶s̶ ̶a̶n̶d̶ ̶g̶o̶o̶g̶l̶e̶ ̶d̶o̶c̶ ̶f̶i̶l̶e̶s̶ ̶a̶n̶d̶ ̶t̶u̶r̶n̶ ̶o̶n̶ ̶s̶h̶a̶r̶i̶n̶g̶ ̶b̶y̶ ̶l̶i̶n̶k̶.̶

NVM i couldn't replicate that. I tried this on the test folder I made below and it didn't work anymore.

Ok so I decided to run a test and I created a new folder called Test Folder and I included I google sheets called Test Google Sheets. I ran rsync and it looks like the debug does not update the copied google sheets modification time to. So each time I run it the modification time difference between the Original Google Sheets and the copy gets larger.

So I tried the --size-only flag and it solves the problem, but are there any downsides to this? If so is there a better way to solve this problem?

Useful log thanks.

Hmm, this looks like a bug. It might be a bug in drive rather than rclone though.

Can you post your log in a new issue on GitHub please?

--size-only is not a good workaround. Doc files have unknown size so using size only degenerates to a file existence test which won't update the file if it changes

There isn't a good solution for this if setting the modtime on docs isn't working...

Sorry for the late response. I uploaded it as a bug on github.

I didn't realize that size only wouldn't catch file updates, thanks for your reply!

I tried the same command again this morning and the bug is still there. About a month ago, I think this type of copying worked fine, so I think you are right it is probably something google changed on their end.

1 Like

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