Using Rclone with Nebraska's OneDrive
Support for UNK, UNL, and UNO only
Currently this feature is only available to students, staff, faculty and affiliates at the University of Nebraska at Kearney, the University of Nebraska-Lincoln, and the University of Nebraska at Omaha.
Rclone is an open source file transfer tool to make transfering files to and from various cloud resources such as Box, Amazon S3, Microsoft OneDrive, and Google Cloud Storage and your local machine a simpler task. Guides on how to set up a variety of resources to transfer to and from can be found at rclone's webpage.
This tool can be used to transfer files between HCC clusters and outside cloud providers, such as OneDrive.
Setup RClone¶
-
You must be able to access your NU Office365 account before beginning this process. Contact your local campus IT support if you need help with initial account setup.
-
Open a browser on your local machine and navigate to the On-Demand portal for the cluster of your choice. We use Swan for this example: https://swan-ood.unl.edu.
SelectDesktop
underInteractive Apps
in the menu at the top of the page to get a virtual desktop on the cluster.Scroll down to the bottom of the next page, and click on the blue
Launch
button. When the resource is ready, click on the blueLaunch Desktop
button that appears on the next page.On the virtual desktop, click on the
Web Browser
icon at the bottom of the window to open a Firefox window. -
Enter the URL
https://uofnebraska-my.sharepoint.com
to open the nebraska.edu SharePoint site: -
Log into SharePoint using your nebraska.edu (TrueYou) credentials,
where XXXXXXX is your NUID. Ensure you can see your files.
-
On the virtual desktop, click on the
Terminal Emulator
icon at the bottom of the window to open up a command shell.Run the following commands in the terminal window to setup a new remote named "NUOD" in Rclone
Setup NU OneDrive from the terminal
[appstest@c1207 ~]$ module purge [appstest@c1207 ~]$ module load rclone [appstest@c1207 ~]$ rclone config create NUOD onedrive
-
The browser window should automatically open a new tab and complete the setup in OneDrive. You should see a success page similar to:
-
Switch back to the terminal. Rclone should have exited back to the command prompt without any errors. To verify the remote is setup, run
rclone listremotes
and confirm the "NUOD" remote is listed:Now test the connection by running the
lsf
command. You should see a listing of your OneDrive files.List contents of OneDrive
[appstest@c1207 ~]$ rclone lsf NUOD:/
Tip
Using the Open OnDemand
Desktop
app is only required for initial setup of the remote and renewing credentials. After the setup, rclone may be used from a plain command prompt, i.e. when connecting via PuTTY in Windows or Terminal on Mac. -
To upload or download files, use the
rclone copy
command. For example:Transferring files
[appstest@c1207 ~]$ rclone copy NUOD:/SomeFile.txt ./ [appstest@c1207 ~]$ rclone copy ./SomeFile.txt NUOD:/
-
To download directories, use the
rclone copy
command and use directory names over file. This copies the contents of the folders, so you need to specify a destination folder.Download a directory from OneDrive
[appstest@c1207 ~]$ rclone copy NUOD:/my_hcc_dir ./my_hcc_dir
To upload a directory named
my_hcc_dir
to OneDrive, userclone copy
.Upload a directory to OneDrive
[appstest@c1207 ~]$ rclone copy ./my_hcc_dir NUOD:/my_hcc_dir
-
Rclone also supports using sync to transfer files, similar to rsync. The syntax is similar to
rclone copy
. This would only transfer files that are updated by name, checksum, or time. The example below would sync the files of the local directory to the remote directory on OneDrive.transfer.sh
[appstest@c1207 ~]$ rclone sync ./my_hcc_dir NUOD:/my_hcc_dir
-
To delete the remote and remove any stored credentials, use the
delete
subcommand.Delete the remote from Rclone
[appstest@c1207 ~]$ rclone config delete NUOD