Skip to content

Instantly share code, notes, and snippets.

@pranscript
Last active December 30, 2020 02:32
Show Gist options
  • Save pranscript/731831c8f48a0ee8fdbd2acc646fb7e2 to your computer and use it in GitHub Desktop.
Save pranscript/731831c8f48a0ee8fdbd2acc646fb7e2 to your computer and use it in GitHub Desktop.
gclone usage to copy data from google drive using Service Accounts (SA)

Prerequisite

  1. Assuming SA accounts are already added to each drive. All these steps will be available in AutoRClone tutorials on internet.

  2. During gclone config, remember to put values for "service account file" and "service account path folder".

     For file - C:\gcloneFolder\accounts\XXXXXXXXXXXXXXXXXXXXXXXXXXX.json
    
     For path - C:\gcloneFolder\accounts\
    

Example Command

gclone copy remoteSourceName:"{XXXXSOURCE_IDXXXX}/Folder1/Folder2 with a space/Folder 3/" remoteDestinationName:"{XXXXDESTINATION_IDXXXX}/Folder1/Folder2 with a space/Folder 3/" --drive-server-side-across-configs -P --drive-stop-on-upload-limit=true

  1. SourceID/DestinationID - You can find these on the URL of browser, when you open the drive. https://drive.google.com/drive/u/1/folders/SOURCE_OR_DESTINATION_ID
  2. RemoteSourceName/RemoteDestinationName - The name of remote you set during rclone config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment