Skip to content

Microsoft OneDrive

This page will describe how you can configure and use Microsoft OneDrive within the TU/e Umbrella HPC Cluster.

Configuration

A one-time setup is required to configure OneDrive for your TU/e Umbrella HPC account. This needs to be done through an interactive desktop session.

1. Start an interactive Desktop Session

Virtual Desktop

Login into the webinterface of hpc.tue.nl and request an Interactive Desktop (Scroll Down to the bottom of the list of Tiles).

Any available queue will do, if unsure choose: tue.default.q.

1 hour, 1 CPU and 2 GB of memory should be sufficient to finish the configuration. Please do NOT request a GPU for this interactive session.

Open the desktop session once the interactive desktop session is ready and continue to the next step.

2. Setting up a connection to OneDrive

OneDrive Setup in OOD

Start up the terminal within the desktop session, and run the following command:

rclone_setup_onedrive # (1)!
  1. This effectively runs the following command:
    rclone --config=~/.config/rclone/rclone.conf config create --onedrive-drive-id=1 --onedrive-drive-type=business --onedrive-region=global OneDrive onedrive
    

A web browser window should pop up allowing you to log in with your TU/e credentials. If everything went well you should now see: Success! - All done. Please go back to rclone.

You can now close all windows and end the desktop session (left-click on your name in the upper right corner, choose "Log Out..." and then the press "Log Out" button).

3. Validate Configuration

If everything went well OneDrive should now be visible in Open OnDemand > Files, or in SSH:

rclone ls OneDrive:

If this is not the case, please try again starting from step 1. Please contact us if you keep running into issues or require further assistance.

Usage

Ensure that OneDrive is configured correctly. The Open OnDemand environment on hpc.tue.nl should be self-explanatory for most users. For SSH, command line see the command examples below:

In general we'd suggest to use the built-in help command from rclone:

rclone --help
rclone ls --help

Listing Files

# Usage
rclone ls OneDrive:[path]

# Example, List all files
rclone ls OneDrive:

# Example, List all files within path
rclone ls OneDrive:Projects/Example

Copy Files

Create an empty hello.txt file and upload it to OneDrive using rclone copy as below in a terminal:

touch hello.txt
rclone copy hello.txt OneDrive:/test

This creates a toplevel directory in OneDrive called 'test' if it does not already exist, and uploads the file hello.txt to it.

To verify the uploading is successful, you can either login to OneDrive in a web browser to check the file, or use rclone ls command in the terminal as:

rclone ls OneDrive:/test

Copy the contents of a source directory from a configured OneDrive remote: OneDrive:/src/dir/path, into a destination directory: /dest/dir/path, using the code below:

rclone copy OneDrive:/src/dir/path /dest/dir/path

Identical files on the source and destination directories are not transferred. Only the contents of the provided source directory are copied, not the directory name and contents.

copy does not delete files from the destination. To delete files from the destination directory in order to match the source directory, use the sync command instead.

If only one file is being transferred, use the copyto command instead:

rclone copyto OneDrive:/test/hello.txt test-onedrive.txt

Avoid the usage of rclone mount

This can lead to unexpected behavior and is often missunderstood as such will only be available on the node you're currently logged into.