Rclone syn remote to local

Can i have command line to sync remote files to local server ?
What i want is to have possibility to download files from google drive team ( now named as shared drive), when i need to use it ?

So you are just looking for the sync syntax? The basics of that is described here:

You will have to substitute your own folder-path and remote-name obviously, but you haven't told us that info, so I can't make the example any more spesific.

Note that you don't have to sync the data to use it. If you are ok with having a bit slower access-time compared to local storage then you can just mount your remote and access data directly on-demand.

Oh, and welcome to the forum. We are happy to help, but do note that there is extensive documentation available on the site, so that's the first place to go to learn. It's better to ask questions here afterwards if there is something in the documentation you want clarification on, or more examples of.

Thanks for you response...
But in the syntaxe of sync, the local folder on my linux server is synchronized with remote, i backup my files to google team drive without no problem...
But the question is how to get back this files to my server from google team drive ??

sync can be used both ways, but if you just want to grab something spesific you might just want to use copy instead. A basic example:

rclone copy MyGdrive:/somefolder /home/stigma/somefolder -P

This will copy "somefolder" from the Gdrive to my home-folder on the local system (the -P is just to show you the progress of the copy).

Or instead you can do this:
rclone mount MyGdrive: /home/stigma/MyGdrive
This will make it look like the whole Gdrive is in a folder on the system. You can drag&drop copy to or from it just like you would interact with any other folder.

Does that help get you started, or am I misunderstanding what you are asking for?


BUT with

google team drive

no way, this is specific and lot of command dont work with ... !!!

When you configure your Gdrive remote, you will be asked if you want to set it up as a teamdrive or a normal drive.

If you set the remote up as a teamdrive, rclone can do everything with the teamdrive that it could do with a normal remote. All commands work with it.

Trust me, I use teamdrives myself :wink:

Ok, Thank you for your assistance, but for me not working, even ls or lsd not work...
I will see what wrong with my server !!!
So i found solution with gdown for downloading, and i continue to use rclone for uploading to google team drive..

I would think it would be much better for you to just fix your teamdrive config.. it's not particularly difficult, so the problem you are having is mostly likely something simple.

If you can show us what it says when you run rclone config dump or just copypaste the contents of your rclone.conf then I can take a look and see if I spot something wrong.
(Please note: rclone config can contain some sensitive data, like client secrets and crypt keys - so remove or redact these before posting it)

But of course it is up to you if you want to spend time trying to fix it or not - I'm not going to force you :slight_smile: I just think it's sad you have to use a workaround like when you don't have to.

 "MX": {
        "scope": "drive",
        "shared_with_me": "true",
        "team_drive": "XXX",
        "token": "{\"access_token\":\"XXX\",\"expiry\":\"2019-10-28T22:21:45.994890928Z\"}",
        "trashed_only": "true",
        "type": "drive",
        "use_created_date": "true"

There are two settings here that are probably causing problems:

"trashed_only": "true",

This will make it so you can ONLY see trashed files. Unless you are actually trying to look through your trash, you should not use this. You will not be able to access any of your normal files when this is on.

"shared_with_me": "true",

When this is on, rclone will work in the "shared with me" area of the drive instead of your normal file area. Are you sure you want to use this?...

Here is an example of a simple working setup I just made to test:
"testing": {
"scope": "drive",
"team_drive": "6kLhhuvarjgUBUPKAV",
"token": "{"access_token":"ya29.Il-pB1mylE11EDUasdadsdadasdHWyIRc_QwZltwsyDadasdadadasalkWuasdadadasd_oBy7BaOjBUS45FERAasdadsadasP-sMawsdasdadsdas_aXQ0oA","token_type":"Bearer","refresh_token":"1//0cwefwefwfwewfARAAxcfbdghfdF-L9Irrgdgd-sfgfdgWEgj2ismsdfgdfgdsg-dnf6JdmhtXA_nn7as-esdfgvadgBdfgfgQ3eE","expiry":"2019-10-28T23:32:17.8175928+01:00"}",
"type": "drive"

(I have replaced my token and teamdrive-code with nonsense for security reasons)

Here is how it looks in the rclone.conf file (a bit easier to read):
type = drive
scope = drive
token = {"access_token":" is private information"}

The simplest way for you to make a clean working setup may just be to make a second, new remote via rclone.config (this will not make the old one not work, so don't worry)

  • rclone config
  • new remote (n)
  • choose 13 (google drive)
  • clientid: just leave blank
  • client secret: just leave blank
  • scope: choose 1, full access
  • root folder: just leave blank
  • service account: leave blank
  • advanced config? choose no.
  • use auto config? choose yes
  • browser opens and you authenticate, then go back to rclone
  • configure as teamdrive? choose yes
  • choose your teamdrive
  • "yes this is ok"

ready to use :slight_smile:

Yes Good...
It works great...
just for last i do n for auto config, because i am on remote server...
Thanks a Lot... :wink: :wink:

1 Like

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