Table of Contents

Data transfer with Google Drive

There is a preinstalled software module on Hábrók named rclone with which you can download and upload files and directories to and from your (RUG) Google Drive.

Please be mindful of your data management and data archival requirements.
Google Drive is a very helpful tool to save and access files but it is not recommended as an appropriate storage solution for research data archival. Consider using tools hosted at the university like the RDMS. For questions regarding data management, you can contact the Digital Competence Center (dcc@rug.nl) or the data steward in your faculty.

Loading the application

Loading rclone is similar to loading other modules in Hábrók. You can do so by running module load rclone/1.66.0. From that point on, you can use the application. However, it still needs to be configured to your own Google Drive, for which there are instructions in the next section.

Setting up Google Drive's API

There are extended instructions in the initial setup page of the official documentation, but here we detail the necessary steps to connect the application to your RUG Google Drive.

After going through these steps you don't need to use the Remote Desktop to use rclone and can use it from the login and interactive nodes (or in compute jobs).

Loading and configuring the application

We will need a browser for the next section, so it is easier to do so via a Remote Desktop Session through the Hábrók Web Portal. Please log in with your university account at https://portal.hb.hpc.rug.nl.

Then, click on 'Hábrók Remote Destkop' which will open a screen to queue a remote desktop job. Choose the regular partition, 2 cores, 1 hour and 8 GB and press launch. After a few moments you will see your job in the queue, soon after a blue Launch Hábrók Remote Desktop button will appear. Press it to enter the desktop environment.

You will then see a Linux Desktop Environment with a few icons at the top. The small black square will open a terminal. Press it to open the terminal and load rclone by doing:

module load rclone/1.66.0
rclone config

Using Rclone

Once the initial setup is complete, transferring files to and from Google Drive is simple. rclone offers many options, which you can find here.

A list of useful basic options for Google Drive, assuming you named your remote as 'gdrive':

# List the directories in your Google Drive
rclone lsd gdrive:
 
# Copy a file called my_file.txt from your $HOME directory to
# a directory called backup on your Google drive
rclone copy $HOME/my_file.txt gdrive:backup
 
# Copy the my_file.txt in your Google Drive's directory named backup
# to a directory on Hábrók in $HOME/habrok_backup
rclone copy gdrive:backup/my_file.txt $HOME/habrok_backup/
 
# Make the directory $HOME/results identical to the folder
# results on your Google Drive. 
# !!!!! This will remove and modify files to make directories identical !!!!!
rclone sync $HOME/results gdrive:results