User Tools

Site Tools


wiki:manipulate_google_drive_cli

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:manipulate_google_drive_cli [2024/05/10 16:02] – created antisawiki:manipulate_google_drive_cli [2024/06/13 16:25] (current) – add Google OAuth method and screenshots antisa
Line 43: Line 43:
  
 After that is done follow [[https://rclone.org/drive/#3-configure-rclone-assuming-a-new-install|steps 3 and 4]] to make sure it works After that is done follow [[https://rclone.org/drive/#3-configure-rclone-assuming-a-new-install|steps 3 and 4]] to make sure it works
 +
 +===== Use Google OAuth account =====
 +This is another way to authorize the rclone. Just follow the steps [[https://rclone.org/drive/#making-your-own-client-id|here]]. Either way should work.
 +
 +**Some screenshots**
 +
 +{{ :wiki:screenshots:google_oauth_client_id1.png?400 |Creating new OAuth client id 1}}
 +{{ :wiki:screenshots:google_oauth_client_id2.png?400 |Creating new OAuth client id 2}}
 +{{ :wiki:screenshots:google_oauth_consent1.png?400 |Choose Internal if you have a Google Workspace account}}
 +{{ :wiki:screenshots:google_oauth_scope1.png?400 |Selecting scopes}}
 +{{ :wiki:screenshots:google_credentials.png?400 |Both auth methods active}}
  
 ====== Example commands ====== ====== Example commands ======
Line 51: Line 62:
   ./rclone listremotes   ./rclone listremotes
  
-Copy folder inside the my_remote+Copy folder inside the my_remote using service account methodThis reads the secrets from downloaded json;
-  ./rclone copy 'my_remote:folder1' 'my_remote:folder1_copy'+
  
 +  ./rclone -v --drive-impersonate me@gmail.com copy 'my_remote:folder1' 'my_remote:folder1_copy'
 +  
 +Copy folder inside the my_remote using Google OAuth account. The client's id's and secret is also obtained from the json you get from finishing the OAuth steps and can be used on cmd line.
  
 +  ./rclone -v --drive-impersonate me@gmail.com --drive-client-id 'xxxxxxx194eq.apps.googleusercontent.com' --drive-client-secret 'xxxx' copy 'my_remote:folder1' 'my_remote:folder1_copy'
  
 ====== Tested on ====== ====== Tested on ======
wiki/manipulate_google_drive_cli.txt · Last modified: 2024/06/13 16:25 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki