}}
===Upload and download files using rclone
===
Unlike [https://curl.haxx.se/ curl], [https://rclone.org rclone] lets you create a configuration once for each remote device and use it repeatedly without having to enter the service details and your password every time. The password will be stored encrypted in ~/.config/rclone/rclone.conf on the computer or server where the rclone
command is used.
First, [https://rclone.org/install/ install rclone on your computer if it has a Unix-like environment].
If used from our clusters, please note that it is no necessary to install rclone as it is already available:
$ [name@server ~] $ which rclone
$ /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/bin/rclone
Next, configure a remote storage device profile with
$ rclone config
You now have the option to edit an existing remote device, create a new remote device, delete a remote device, and so on. Let's say we want to create a new remote serice profile called nextcloud:
choose "n" for "New remote"
Enter name for new remote --> nextcloud
Type of storage to configure --> 52 / WebDAV
URL of http host to connect to --> https://nextcloud.computecanada.ca/remote.php/dav/files/
Name of the WebDAV site/service/software you are using --> 2 / Nextcloud
User name -->
choose "y" for "Option pass"
Password -->
Leave "Option bearer_token" empty
choose "no" for "Edit advanced config"
choose "yes" for "Keep this 'nextcloud' remote"
choose "q" to quit config
You should now be able to see your new remote service profile in the list of configured ones with
$ rclone listremotes
You can probe available disk space with
$ rclone about nextcloud:
To upload a file, run
$ rclone copy /path/to/local/file nextcloud:remote/path
To download a file, run
$ rclone copy nextcloud:remote/path/file .
==Sharing files using Nextcloud==
When you select a file or directory to share, type the user’s first name, last name, or username and the list of matched users registered in CCDB will be displayed in “Firstname Lastname (username)” format. Please review the name carefully as some are very similar; in doubt, enter the username which is unique. You can also share files with a group using their CCDB group name (default, RPP, RRG, or other shared groups).
To share a file with people who don’t have an Alliance account, use the Share link option and provide their email address. Nextcloud will send an email notification with a link to access the file.