Rclone does not sync google sheet files to local .xlsx files

What is the problem you are having with rclone?

I have a Google Drive folder, and a local GNU-Linux folder I want to keep up-to-date with the GDrive daily. To this aim, I do an rclone sync' GDrive to local in a crontab job; very often, rclone sees a modified file in the GDrive as non-modified and skips the sync. This especially occurs with a certain google sheets file (note that it has to be converted to .xlsx file first). I have tried to copy' instead of `sync', and several options, to no avail.

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

rclone v1.53.3-DEV

  • os/arch: linux/amd64
  • go version: go1.18.1

1.53.3 is the latest version in the Ubuntu 22.04 TLS distribution. I would rather not manually update to a newer version

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 sync -vv unifi:Accessi /home/signo/GDrive-unifi/Accessi --exclude-from excluded-files

The rclone config contents with secrets removed.

[unifi]
type = drive
client_id = 
client_secret = 
token = 
root_folder_id = 

A log from the command with the -vv flag

rclone sync  -vv unifi:Accessi /home/signo/GDrive-unifi/Accessi --exclude-from excluded-files
2023/09/19 23:31:02 DEBUG : rclone: Version "v1.53.3-DEV" starting with parameters ["rclone" "sync" "-vv" "unifi:Accessi" "/home/signo/GDrive-unifi/Accessi" "--exclude-from" "excluded-files"]
2023/09/19 23:31:02 DEBUG : Using config file from "/home/signo/.config/rclone/rclone.conf"
2023/09/19 23:31:02 DEBUG : Creating backend with remote "unifi:Accessi"
2023/09/19 23:31:02 DEBUG : unifi: Loaded invalid token from config file - ignoring
2023/09/19 23:31:02 DEBUG : unifi: Saved new token in config file
2023/09/19 23:31:03 DEBUG : Creating backend with remote "/home/signo/GDrive-unifi/Accessi"
2023/09/19 23:31:03 DEBUG : visitatori-new.xlsx: Size and modification time the same (differ by 0s, within tolerance 1ms)
2023/09/19 23:31:03 DEBUG : visitatori-new.xlsx: Unchanged skipping

Before digging deeper into this issue please update your ancient rclone v1.53.3-DEV --> v1.64.

There is no point in troubleshooting some old versions.

Rclone is stand-alone binary and does not have any dependencies. You do not risk anything by not using your repo version.

sudo apt remove rclone
sudo -v ; curl https://rclone.org/install.sh | sudo bash

v1.53 is from 2020...

You can also install snap version - not recommended IMO as it has serious limitations but could be enough for your use case.

I have now upgraded:

rclone v1.64.0

  • os/version: ubuntu 22.04 (64 bit)
  • os/kernel: 5.15.0-84-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.21.1
  • go/linking: static
  • go/tags: none

I am getting the same result as above, only now rclone never syncs, not even when called interactively (in addition to when called from crontab)
However I think I found the source of the problem: actually, that file modification time is not updated, even though the file has been modified by a Google Form, so rclone is correct in not syncing. (As it is often the case, the bug is google, and their policy of changing the way their applications work without notifying users).
I will keep you updated if I find more.
Thank you,
Giorgio

It seems indeed that what I ran into is a recent change from google:
https://groups.google.com/g/google-apps-manager/c/c8E-EUyUpZA?pli=1

1 Like

Thx for sharing this info.

Since, as I found after posting, GoogleDrive actually does not update the time of the response spreadsheet of a Google Form when a new form is sent in, there is no error in rclone, and no possible solution for my problem.
An obvious workaround is to 'copy' instead of 'sync', or to just 'touch' the files you want to force syncing, if there are just a few.
I need to keep only one file up to date, so I inserted a 'rclone touch <that-form-response-file.xlsx>' before the sync job.

I think this issue is solved.
Giorgio

1 Like

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