Sync to google drive = multiple duplicate folders

I've followed a few online guides on how to use rclone to backup a local folder to google drive. This works however subsequent backups instead of overwriting the destination directory on gdrive it instead creates another backup with the same folder name.

rclone sync --verbose ~/Backup/ gdrive:backup

which if ran 3 times results in:

gdrive:
/backup
/backup
/backup

Not really sure where i'm going wrong, none of the guides mention this. I've tried using the rclone copy cmd with the same results.

rclone v1.59.1

  • os/version: arch "rolling" (64 bit)
  • os/kernel: 5.19.5-arch1-1 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.19
  • go/linking: dynamic
  • go/tags: none

hello and welcome to the forum,

please post the redacted config file.

is the remote using a gdrive shared folder?

the issue of duplicate folders has been discused in the forum a number of times and there is a github issue.
https://forum.rclone.org/t/how-to-prevent-creating-duplicate-folders-in-google-drive-with-server-side-transfer/7278/3

Thanks for the reply. Redacted config below. It's not a shared gdrive shared folder and was created by rclone.

[gdrive]
type = drive
scope = drive.file
token = {"access_token":"..."}
team_drive =

ok.

i do not use gdrive much, not sure what the exact issue is.
tho i kinda, sorta, remember this issue being discussed in the forum.

fwiw, i would try to create a very simple example using debug output with -vv or --verbose

Thanks again for the reply. I was using --verbose, wasn't particularity enlightening tbh, just looked like a fresh sync was being done each time, no mention of an existing directory on gdrive.

Anyway I started trying a few things and decided to try syncing to a destination directory another level deep rather than at the gdrive root, so instead of /backup on gdrive as the destination I tried /backup/rclone and guess what, it now works as expected and no duplicate directories are created!

Looks like this could be a rclone bug? Anyway fingers crossed it's now sorted and thanks again for taking the time to help me out.