Rclone as rsync for google drive

Hi, thanks for your reply.
I need to use it on windows.
Can you write me down the correct command?

dos batch file or powershell?

I prefer the old batch if it's possible

for old-style dos batch; cannot be done with one line

Ok, powershell will be ok then! :slight_smile: Thanks

for old style batch, this post has all the info you need and more.

I read a good portion of that post some hours ago but what I want is something more linear...
reading that rclone is like rsync I imagined exactly something like rsync:
type of cloud storage, credentials, source path, destination path... and nothing more.
For example for now I cannot even understand how to trigger the root folder of a Google Drive to copy everything and not a specific folder.
Maybe rclone is not what i was searching for at this point...

you need to create a rclone config file, for the gdrive.

create a remote pointing to your google drive - https://rclone.org/drive/

Yes, already read also that part :slight_smile:
But I imagined that I was missing something, may I was wrong.
It seemed strange to me that a config file is needed to connect, so I opened a new thread.
Anyway I will give it a try, but how can I trigger the root?
After the confi I can write something like this?
rclone copy remote: C:\backup_gdrive
Where "remote:" is the root of Google Drive

one way or another, you must have a remote to access gdrive.
it is a one time thing to create a config file, really should take just a few minutes.

but if you really want to do it the complex way, without a config file.
you can create a remote on the fly

1 Like

Very good! Thanks for all the hints!

for sure, rclone can do what you want, incremental backups.

so let's do this step by step.
after you create the remote, you need to test it.
rclone lsd remote:

Done! At the end I used the config file with the oauth credentials associated to a personal app.
Then I moved the config to a custom location and called: rclone --config="K:\rclone\gdrive-readonly.conf" sync GDRIVE: "K:\rclone\test"
The only thing that I don't find good is that the oauth token has a very short life.

No problem, it renews, as required, without further intervention

Yes, I have seen that It automatically renew... I's really a good piece of sw this rclone.
Is it possibile to mantain two or more duplicates on the destination folder??

what do you mean by duplicates?

Google Drive permits files and folders with the same name. I want to copy everything, not only the most recent one.


If your destination drive supports copy on write you could snapshot after sync, or use something like restic backup to build the same sort of thing on any old filesystem by running restic after sync.

Google Drive's ability to hold multiple files with the same name in a directory is trouble...

Hi, maybe I was not clear, I'm using rclone to clone google drive content on a local folder.
For this reason I have the prob of duplicates :slight_smile:

Oh and the gdrive content has more than 6 years, so the duplicates will be always there