Rclone SYNC (not copy) with Google Drive delete of files not working?

Hi,
when I use rclone sync Google Drive to local (with service-account- and impersonate-options) the local files that do no longer exist in the users drive are locally not deleted (they remain locally). Why is that? I thought with the sync-option it should exactly do that, so delete the local items that do no longer exist on Google Drive.
Regards,
Oliver

BTW, I forgot to mention the release: rclone-v1.39-128-gb33e3f77-windows-386.zip

They should. Check the log when running with -vv. Are there any ERRORs if so rclone won’t do the deleting.

Hi Nick,
thanks for your very quick response! Unfortunately I am unable to find a log-file. But on screen output I cannot find any “errors” and the files remain in the destination although they are deleted on Google Drive (in the cloud).
Regards, Oliver

Hi,
while rclone is running, I can see some errors like

  • Duplicate object found in source - ignoring
  • 500 Internal Server Error
    But not on the file that should be deleted in the destination. So does rclone not delete at all if anywhere an error occurs? Not only if an error on that file occurs?
    Regards,
    Oliver

If rclone counts any ERRORs then it won’t do any deleting. This is a safety mechanism - an error might mean it can’t read a directory in the source - you don’t want it deleting that directory in the destination at that point.

Use -v and you’ll see stats printed at the end - that will say how many errors happened.

Hi,
it would be great if there were a switch to override this and delete files anyway. This is because after downloading the files to a local PC the customer makes a backup to external harddisks to have some generations of the files and can make a restore of a whole directory on specific point in time. So local deletion by rclone would be important regardless of errors or not.

There is this issue which should help.

Also you could try –delete-before which is slightly less efficient as it needs two passes through the data.

My advice is to find the ERROR in the log and fix it though.

OK, that helped. Thank you!