You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »


Getting an Access Token

You need to set up rclone on NeSI/Hypocentre (or whatever Linux box).

Follow the instruction in this page : Dropbox (rclone.org)

Important 

rclone setup will usually open up a web browser so that you can log into Dropbox, but if you are on SSH terminal without X-windows, you have to handle differently. 

Don’t use autoconfig - say no and it will give you a URL to go to to do the auth magic and then copy the key back to the command line.  

Establish a connection 

To use Dropbox on NeSI, you should log in to Mahuika (doesn't work on Maui).


Create an empty file


/$HOME/.config/rclone/rclone.conf


and copy the following into the file. (If you have your own access token, use yours)


[remote]
type = dropbox
client_id =
client_secret =
token = {"access_token":"ZRRaih6KH9sAAAAAAAAAAR6B_KzKfwvYKx89-Va1-4Jxxq7mrk3mvBm1vZqQeFmA","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"}

From Hypocentre, copy this.

[remote]
type = dropbox
token = {"access_token":"5JdesOCYZswAAAAAAAAAAe1c-DtFBfRcCz8D3UAcNTrghSaTPbNow2us11F9JSWP","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"}


I'm revealing this access code in good faith that you will not abuse my account!!! 


Then try

module add rclone
rclone lsd remote:


If you can see a output similar to below, you now have the access to Dropbox. Congratulations.

(python3_mahuika) baes@mahuika01: ~$ rclone lsd remote:
          -1 2020-10-20 01:00:56        -1 backup
          -1 2020-10-20 01:00:56        -1 emp_ds

Some useful commands.

List all the files in your dropbox

rclone ls remote:

To copy a local directory to a dropbox directory called backup

rclone copy v21p1 remote:Cybershake/v21p1 -vv

Meaning, everything under the directory v21p1 (note: v21p1 itself is excluded) will be copied to Cybershake/v21p1. It doesn't auto-makedir, so you should make a folder named "v21p1" under Cybershake first.

-vv gives a detailed log and progress. You can assume as long as a file is listed on Dropbox folder, its upload is "complete". If you terminate the upload command, and restart, it will skip the files that have been uploaded already. The upload is NOT fast. 50Gb takes about 5 hours. It's best to run it on the login node, but in "screen".

To generate a link to file or folder to share

 rclone link remote:path [flags]



For more info,  check out https://rclone.org/dropbox/ 

  • No labels