Using Rclone to Access Dropbox Cloud Storage on Elzar

Creation date: 8/1/2023 4:41 PM    Updated: 8/1/2023 4:43 PM   dropbox elzar hpc software
Rclone is a powerful tool that allows you to manage files on cloud storage from the command line.  It can be used to sync, copy, move, delete, check, and mount over 70 cloud storage products including Dropbox, AWS S3, OneDrive, Google Drive, etc.  Rclone supports a wide variety of features (e.g., compression, chunking, hashing).

Rclone is available on bamdev1 and bamdev2.  It will be necessary to configure Rclone in a remote/headless configuration for each cloud provider.  Comprehensive documentation can be found [here](https://rclone.org/docs/).

Loading Rclone:


> module load EBModules   
> module load rclone

Rclone Dropbox Configuration


👉 You will need to install Rclone on your desktop/laptop in order to obtain an authorization token.


> rclone config   
n) New remote   
n/s/q> n   
name> dropbox   
Storage> (select Dropbox - as of this writing, "12") 

client_id> [press enter]   
client_secret> [press enter]   
Edit advanced config?   
y/n> n


Switch to your laptop/desktop with Rclone installed:  
> rclone authorize "dropbox"

This will launch an authorization page on your default web browser:


Copy the access_token on the command prompt where you last ran rclone authorize

Paste the following into your remote machine --->   
{"access_token":.........   
<---End paste

Return to your console session on `bamdev1` or `bamdev2` and paste the full access token string:

token = {"access_token":.....}   
y/e/d: y   
e/n/d/r/c/s/q> q

Common Rclone commands


List remotely configured endpoints:  
> rclone listremotes

List directories in top level of your dropbox:  
> rclone lsd dropbox:

List all files in dropbox:  
> rclone ls dropbox:

Copy `file_name.txt` from local to dropbox folder test:  
> rclone copy file_name.txt dropbox:test

Copy file_name.txt from dropbox to local:  
> rclone copy dropbox:some_folder/file_name.txt .

Robert Petkus, 8/1/23




Files