Data transfers ๐
Data Transfers via the command line ๐
There are the usual ways, how you can transfer your data to the cluster:
scp: The regular way of transferring data between remote machines via SSHrsync: Also a standard tool in Linux likescp, but has the advantage that it can resume broken transfers as it normally keeps the metadata of the filesrclone: A mighty tool for data transfers, normally to cloud storage. May also be utilized for data transfers to Palma and might be faster than the former solutions when transferring many small files- WinSCP: The standard GUI tool when using Windows
Data Transfers via the web interface ๐
This part is still in a testing phase! Please be careful when using it!
If you have access to Palma, you can use a Nextcloud instance for data transfers. To make use of it, do the following
- Create a directory called
transferat/scratch/tmp/$USER:mkdir /scratch/tmp/$USER/transfer - Log in at https://palma.uni-muenster.de/nextcloud/
- Click on the "scratch" directory. (You might have to click multiple times in the first run). Data you put in here will be stored in the
transferdirectory created earlier. Also, data that you put in thetransferdirectory will be visible here. - The recommended way to use this is to upload your data via the web interface and move it to another location on the cluster afterwards. The speed of the Nextcloud instance will probably decrease, if the directory becomes too crowded.
- In future iterations, this is intended to be used for also realizing data transfers between different HPC clusters.
Transferring data to the Nextcloud via rclone ๐
If you are trying to use rclone from outside of the university, you should not connect via jumphost!
If you want to copy data to and from Palma and have rclone available, you can use it for performant data transfers:
Setting up rclone ๐
rclone config- Choose
n(for new remote) - Choose a name for the remote (e.g.,
name> palma-web). You can choose this one freely, but the more informative, the better. - Choose
webdavas the storage type (Storage> webdav) - Set the URL to
url> https://palma.uni-muenster.de/nextcloud/remote.php/dav/files/<your user id>(replace<your user id>with your user id) - Choose
nextcloudas the vendor (vendor> nextcloud) - Enter your user id (
user> <your user id>, replace<your user id>with your user id)) - Choose to type in your own password (
y/g/n> y - For the password:
- Create an app password in the web interface ( https://palma.uni-muenster.de/nextcloud/ ) by clicking on your avatar in the top right and the at Settings โ Security enter a name for your app password (doesn't matter for
rclone, but helps you remember which password you use for which device) and click "Create new app password". - Copy and paste the password shown into the terminal. For the password confirmation, just paste it again.
- Create an app password in the web interface ( https://palma.uni-muenster.de/nextcloud/ ) by clicking on your avatar in the top right and the at Settings โ Security enter a name for your app password (doesn't matter for
- Leave the bearer token empty (
bearer_token>) - Don't edit the advanced config (
y/n> n) - Confirm that everything looks OK (
y/e/d> y) - Choose
qto quit the config wizard
- Choose
Data transfer with rclone ๐
Remember to create the transfer directory first and check if it works in the WebUI before copying data with rclone!
- Copying data from remote to Palma:
rclone copy /path/to/local/folder palma-web:scratch/path/in/transfer/directory --progress --verbose - Copying data from Palma to remote:
rclone copy palma-web:scratch/path/in/transfer/directory /path/to/local/target --progress --verbose
See also:ย https://linuxpip.org/rclone-examples
Mounting WebDAV (e.g. Sciebo or Nextcloud) as a filesystem with rclone ๐
- Setup the remote host with
rclone configinteractive command line tool, as shown above:- Type in a name for the remote host (for example:
Sciebo). - Select the storage type
webdav - Type in the URL: (e.g., for Sciebo https://uni-muenster.sciebo.de/remote.php/webdav/)
- Select
nextcloudas the vendor - Type in the username: (for Sciebo:
@uni-muenster.de) - Type in the password: (e.g., your Sciebo password).
- Type in a name for the remote host (for example:
rclone will store remote passwords in a config file! It will protect it against accidental onlookers by obscuring it, but that is not a sufficient protection against theft!
On a multi-user system like the HPC cluster, you should set a configuration password (rclone config > Set configuration password),
which enables rclone to properly encrypt your passwords. The downside is that you have to enter the configuration password everytime you use rclone.
Skip all other settings and save. At the end there should be a new entry in the
``` ~/.config/rclone/rclone.conf```
file that looks something like this (if you did not enable encryption)
```
[sciebo]
type = webdav
url = https://uni-muenster.sciebo.de/remote.php/webdav/
vendor = nextcloud
user = <user>@uni-muenster.de
pass = xxx
```
-
Create a directory where you want to mount Sciebo, for example
mkdir ~/sciebo -
Mount sciebo using
rclone mountcommandrclone mount sciebo: ~/sciebo
The mount stays active while the command runs, when you interrupt it with ctrl+c, the mount will be unmounted. Consider a tool like tmux to split your terminal if you don't want to open another terminal window.
-
All content on Sciebo will appear in the ~/sciebo directory as local files and you can copy them, edit them, create new files, etc.
-
Unmount by interrupting the call from step 4
-
In case unmounting fails for any reason (like for example you still using the directory when rclone is stopped), remounting will not work (not even with
--allow-non-empty) and you will have to unmount manually using:fusermount -u ~/sciebo
Transferring files from Palma to storage server outside the university ๐
Another scenario is uploading your research data to a server outside the University of Mรผnster. As an example, we cover here an upload to the public server of the National Center of Biotechnology Information (NCBI), but it should generalize well to other use cases too. As usual, if in doubt, feel free to contact us at hpc@uni-muenster.de or on Mattermost.
Even in this case, you can use rclone.
Setting up rclone ๐
First, you will (once again) need to setup your remote upload by running:
rclone config
This will start the interface that will guide you in setting up your remote, asking you step-by-step for the following:
- The name of the new remote > your free choice. In our example,
NCBI. - The type of storage > Check on the info page of the remote storage server. Here,
ftp - Username > the name of the user account on the remote server that you want to use for the upload
- Password > first
yand then you will be prompted to type the password to the host server - Leave the other entries as default (Press Enter)
- Quit config >
q
Create a folder at the target location (optional) ๐
This can be done with rclone mkdir:
rclone mkdir NCBI:path/to/your/usershare/yourfolder
Files Upload ๐
You can copy your files directly from the login node, by adapting the rclone copy command explained in the previous sections. Alternatively, you can also submit the command via sbatch, leveraging the advantage of a non-interactive job that would run also when you close your session and in case the login node goes down (e.g., due to maintenance).
For the latter option, here is a template of a submission script:
#!/bin/bash
#SBATCH --partition=normal
#SBATCH --nodes=1
#SBATCH --mem=20G
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=4
#SBATCH --time=00:01:00 [!!!] CHANGE THE TIME ACCORDING TO YOUR EXPECTATIONS
#SBATCH --job-name=my-transfer
#SBATCH --output=my-transfer.log
#SBATCH --mail-type=ALL
#SBATCH --mail-user=$USER@uni-muenster.de
rclone -v --progress --bwlimit=100M copy /scratch/tmp/path/to/data NCBI:/path/to/your/usershare/yourfolder