Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| abstract:darwin:transfer:rclone [2025-05-21 15:10] – [Configuration Steps] thuachen | abstract:darwin:transfer:rclone [2025-05-21 16:05] (current) – [Configuration Steps] thuachen | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Rclone on DARWIN ====== | ||
| + | |||
| + | This document describes how to manually configure (set up) Rclone using University of Delaware email account for Google Drive on DARWIN. | ||
| + | |||
| + | <note important> | ||
| + | |||
| + | ===== Rclone manual configuration of Google Drive ===== | ||
| + | |||
| + | ==== Loading Rclone ==== | ||
| + | First, use VALET to load Rclone into your environment; | ||
| + | |||
| + | <code bash> | ||
| + | [traine@login00.darwin ~]$ vpkg_versions rclone | ||
| + | Available versions in package (* = default version): | ||
| + | |||
| + | [/ | ||
| + | rclone | ||
| + | 1.54.1 | ||
| + | * 1.69.2 | ||
| + | [traine@login00.darwin ~]$ vpkg_require rclone/ | ||
| + | Adding package `rclone/ | ||
| + | </ | ||
| + | |||
| + | ==== Configuration Steps ==== | ||
| + | Create a new Rclone remote configuration by typing '' | ||
| + | |||
| + | < | ||
| + | [traine@login00.darwin ~]$ rclone config | ||
| + | |||
| + | No remotes found - make a new one | ||
| + | n) New remote | ||
| + | s) Set configuration password | ||
| + | q) Quit config | ||
| + | n/s/q> n | ||
| + | name> darwinGoogleDrive | ||
| + | </ | ||
| + | Next, find the " | ||
| + | |||
| + | < | ||
| + | Type of storage to configure. | ||
| + | Enter a string value. Press Enter for the default ("" | ||
| + | Choose a number from below, or type in your own value | ||
| + | 1 / Fichier | ||
| + | \ " | ||
| + | 2 / Alias for an existing remote | ||
| + | \ " | ||
| + | 3 / Amazon Drive | ||
| + | \ " | ||
| + | |||
| + | ... Skipping lines... | ||
| + | |||
| + | 20 / Google Drive | ||
| + | \ (drive) | ||
| + | 21 / Google Photos | ||
| + | \ (google photos) | ||
| + | 22 / HTTP | ||
| + | \ (http) | ||
| + | 23 / Hadoop distributed file system | ||
| + | \ (hdfs) | ||
| + | 24 / HiDrive | ||
| + | \ (hidrive) | ||
| + | |||
| + | ... Skipping more lines ... | ||
| + | |||
| + | 59 / iCloud Drive | ||
| + | \ (iclouddrive) | ||
| + | 60 / premiumize.me | ||
| + | \ (premiumizeme) | ||
| + | 61 / seafile | ||
| + | \ (seafile) | ||
| + | Storage> drive | ||
| + | </ | ||
| + | |||
| + | The next couple of steps will ask about adding a '' | ||
| + | |||
| + | < | ||
| + | ** See help for drive backend at: https:// | ||
| + | |||
| + | Option client_id. | ||
| + | Google Application Client Id | ||
| + | Setting your own is recommended. | ||
| + | See https:// | ||
| + | If you leave this blank, it will use an internal key which is low performance. | ||
| + | Enter a value. Press Enter to leave empty. | ||
| + | client_id> | ||
| + | Option client_secret. | ||
| + | OAuth Client Secret. | ||
| + | Leave blank normally. | ||
| + | Enter a value. Press Enter to leave empty. | ||
| + | client_secret> | ||
| + | </ | ||
| + | The next step will give you options to grant Rclone permission to access your files and directories in your Google Drive. We are going to use the default value of '' | ||
| + | |||
| + | < | ||
| + | Option scope. | ||
| + | Comma separated list of scopes that rclone should use when requesting access from drive. | ||
| + | Choose a number from below, or type in your own value. | ||
| + | Press Enter to leave empty. | ||
| + | 1 / Full access all files, excluding Application Data Folder. | ||
| + | \ (drive) | ||
| + | 2 / Read-only access to file metadata and file contents. | ||
| + | \ (drive.readonly) | ||
| + | / Access to files created by rclone only. | ||
| + | 3 | These are visible in the drive website. | ||
| + | | File authorization is revoked when the user deauthorizes the app. | ||
| + | \ (drive.file) | ||
| + | / Allows read and write access to the Application Data folder. | ||
| + | 4 | This is not visible in the drive website. | ||
| + | \ (drive.appfolder) | ||
| + | / Allows read-only access to file metadata but | ||
| + | 5 | does not allow any access to read or download file content. | ||
| + | \ (drive.metadata.readonly) | ||
| + | scope> 1 | ||
| + | </ | ||
| + | |||
| + | For the next steps, we select the default option ("" | ||
| + | |||
| + | < | ||
| + | Option service_account_file. | ||
| + | Service Account Credentials JSON file path. | ||
| + | Leave blank normally. | ||
| + | Needed only if you want use SA instead of interactive login. | ||
| + | Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`. | ||
| + | Enter a value. Press Enter to leave empty. | ||
| + | service_account_file> | ||
| + | </ | ||
| + | For the next question about '' | ||
| + | |||
| + | < | ||
| + | Edit advanced config? (y/n) | ||
| + | y) Yes | ||
| + | n) No (default) | ||
| + | y/n> n | ||
| + | </ | ||
| + | |||
| + | So far we have been answering the configuration questions mostly with the default options. However, the next question is where we will differ from the typical setup process due to firewall permissions restricting '' | ||
| + | |||
| + | < | ||
| + | Use web browser to automatically authenticate rclone with remote? | ||
| + | * Say Y if the machine running rclone has a web browser you can use | ||
| + | * Say N if running rclone on a (remote) machine without web browser access | ||
| + | If not sure try Y. If Y failed, try N. | ||
| + | |||
| + | y) Yes (default) | ||
| + | n) No | ||
| + | y/n> n | ||
| + | </ | ||
| + | |||
| + | After typing '' | ||
| + | < | ||
| + | Option config_token. | ||
| + | For this to work, you will need rclone available on a machine that has a web browser available. | ||
| + | For more help and alternate methods see: https:// | ||
| + | Execute the following on the machine with the web browser (same rclone | ||
| + | version recommended): | ||
| + | rclone authorize " | ||
| + | Then paste the result. | ||
| + | Enter a value. | ||
| + | config_token> | ||
| + | </ | ||
| + | |||
| + | <note important> | ||
| + | The following command used to download Rclone and authorize will need to be run on your local computer, not on DARWIN. The original terminal will need to remain open since we want to paste the code in a future step. The name of the drive (e.g., " | ||
| + | </ | ||
| + | |||
| + | For Linux OS, open a new terminal and run the following command on your local computer: | ||
| + | < | ||
| + | curl -O https:// | ||
| + | unzip rclone-v1.69.2-linux-amd64.zip | ||
| + | cd rclone-v1.69.2-linux-amd64 | ||
| + | ./rclone authorize " | ||
| + | </ | ||
| + | |||
| + | For macOS, open a new terminal and run the following command. Download the [[https:// | ||
| + | < | ||
| + | cd && curl -O https:// | ||
| + | unzip -a rclone-v1.69.2-osx-amd64.zip && cd rclone-v1.69.2-osx-amd64 | ||
| + | ./rclone authorize " | ||
| + | </ | ||
| + | |||
| + | For Windows, first download [[https:// | ||
| + | < | ||
| + | .\rclone.exe authorize " | ||
| + | </ | ||
| + | After running the command, you will be given a URL that will allow you to sign into your university Google email account and request a verification code for Rclone to use. Copy this URL and paste it into a web browser on your local computer. Sign in and afterwards you will be given your verification code. Copy and paste this verification code into the DARWIN shell session. | ||
| + | < | ||
| + | 025/05/14 15:01:53 NOTICE: Config file "/ | ||
| + | 2025/05/14 15:01:53 NOTICE: Make sure your Redirect URL is set to " | ||
| + | 2025/05/14 15:01:53 NOTICE: If your browser doesn' | ||
| + | 2025/05/14 15:01:53 NOTICE: Log in and authorize rclone for access | ||
| + | 2025/05/14 15:01:53 NOTICE: Waiting for code... | ||
| + | 2025/05/14 15:02:19 NOTICE: Got code | ||
| + | Paste the following into your remote machine ---> | ||
| + | YOUR UNIQUE CODE HERE | ||
| + | <---End paste | ||
| + | </ | ||
| + | |||
| + | <note important> | ||
| + | The following options will be displayed in the original terminal where you configure the rclone on a DARWIN shell session. | ||
| + | </ | ||
| + | After you paste the verification code, the last step will ask you if you want to configure this as a " | ||
| + | < | ||
| + | Configure this as a Shared Drive (Team Drive)? | ||
| + | y) Yes | ||
| + | n) No (default) | ||
| + | y/n> n | ||
| + | </ | ||
| + | |||
| + | Now you can review your configuration and make edits if needed. If everything is okay type '' | ||
| + | |||
| + | < | ||
| + | Configuration complete. | ||
| + | Options: | ||
| + | - type: drive | ||
| + | - scope: drive | ||
| + | - token: {" | ||
| + | - team_drive: | ||
| + | Keep this " | ||
| + | y) Yes this is OK (default) | ||
| + | e) Edit this remote | ||
| + | d) Delete this remote | ||
| + | y/e/d> y | ||
| + | </ | ||
| + | |||
| + | Once everything is configured correctly, Rclone will show you a list of your remote configurations, | ||
| + | |||
| + | < | ||
| + | Current remotes: | ||
| + | |||
| + | Name Type | ||
| + | ==== ==== | ||
| + | darwinGoogleDrive | ||
| + | |||
| + | e) Edit existing remote | ||
| + | n) New remote | ||
| + | d) Delete remote | ||
| + | r) Rename remote | ||
| + | c) Copy remote | ||
| + | s) Set configuration password | ||
| + | q) Quit config | ||
| + | e/ | ||
| + | </ | ||
| + | |||
| + | ==== Testing new Rclone remote configuration ==== | ||
| + | |||
| + | To make sure the new remote configuration is working correctly, we will use the Rclone '' | ||
| + | |||
| + | <code bash> | ||
| + | [traine@login00.darwin ~]$ rclone lsd darwinGoogleDrive: | ||
| + | -1 2020-11-16 15: | ||
| + | -1 2020-05-05 16: | ||
| + | </ | ||
| + | |||
| + | For additional information on Rclone and more options, please visit [[https:// | ||
| + | |||
| + | |||