This guide will walk you through setting up the rclone software to access dropbox
This article assumes that you have installed rclone (or rclone is available) on your system. Refer to rclone downloads page if you need to download and install rclone.
On Wahab HPC, you will use the command
rclone
in your shell environment.
This guide can also be used to enable access to Google Drive from Linux, Mac, and Windows desktop.
Because of the web access involved somewhere in the steps, it is best that you use the remote desktop or virtual desktop.
The first step is to issue the rclone config
command. This will guide you through a series of questions, which will be broken up and commented throughout due to the length. First, we need to create a new remote, which is simply an rclone's terminology for a user-defined name for a particular storage area. In the following instruction, we will use my-dropbox
as a name, but please feel free to specify a name that best describes your data (it must not contain whitespaces or begin with a dash [-
]).
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> my-dropbox
Rclone will prompt your response after the >
character. Here, n
and my-dropbox
are the responses to the question. In the illustration above, no remotes have been created yet, so there are only a few options. If you have existing remote(s), you will see more choices of actions.
Next, we need to specify the storage type. Type in dropbox
and press Enter.
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 / 1Fichier
\ "fichier"
2 / Alias for an existing remote
\ "alias"
3 / Amazon Drive
\ "amazon cloud drive"
...
12 / Google Cloud Storage (this is not Google Drive)
\ "google cloud storage"
13 / Dropbox
\ "dropbox"
14 / Google Photos
\ "google photos"
...
Storage> dropbox
The following steps will ask for a "client ID". Leave this blank and hit enter.
Option client_id.
OAuth Client Id.
Leave blank normally.
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>
Next, it will ask if you want to edit the advanced config. Type n
for no.
Edit advanced config?
y) Yes
n) No (default)
y/n>
You will want to use the web browser to authenticate if possible. Answer y
to the next prompt.
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> y
2023/08/18 16:46:49 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=7RQ0t4uRC7Me7Vns9U8GJw
2023/08/18 16:46:49 NOTICE: Log in and authorize rclone for access
2023/08/18 16:46:49 NOTICE: Waiting for code...
At this point, the web browser will open in your remote desktop session and walk you through logging in to Dropbox and you should get a message like this:
You will be asked if you want to keep this remote.
Keep this "my-dropbox" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
Answer y
to this prompt.
You can then exit the rclone config by typeing q
.
Now you can test access with the commands below.
Let us now test if this access works correctly. Let us just list the contents of the root folder. From the terminal, type (do not include $
shell prompt):
$ rclone ls --max-depth=1 my-dropbox:
If all is well, you should see the listing of all the files in the root directories (no folders).
Here is an example from one of the staff members' listing (redacted):
$ rclone ls --max-depth=1 wpurwant-gdrive:
-1 BLANK - Old Dominion University, Norfolk Maturity/Capabilities Model Assessment.xlsx
129915 Position Statements and Bios_2020.pdf
67430 NSF_RFI_Response_final.pdf
22627 DEAPSECURE 2.0 brainstorming
-1 DataUp response.docx
20318 DeapSECURE-module-3-MachineLearning
-1 Fabric Benchmarking 2017.docx
-1 ODU Training.docx
-1 ODU Zoom meetings.docx
-1 PEARC19 Champion Related Activities.docx
-1 Research Computing Strategy brainstorming doc.docx
-1 Restricted-data-computing-platforms-ODU-2022.d20220407.pptx
The first number on every row is the file size. If it is -1, it indicates a native Google document (Docs, Sheets, Slides). Other files will show the file sizes.
In order to copy the files in your dropbox location locally, you can use the following command:
rclone copy my-dropbox:<file name> .
Replace <file name>
with the name of your file. the .
specifies to copy the file to the current directory.
Other rclone commands can be found by running rclone
without any arguments.