Connecting via Rclone¶
Rclone is an open-source command-line tool for managing files across cloud storage platforms. It supports syncing, copying, and transferring files of virtually any size.
When to use Rclone
Use Rclone for large datasets (10+ GB) or when you need scripted/automated transfers. For smaller uploads, the browser interface may be simpler.
Choosing the Right Method¶
| Method | Best for | Considerations |
|---|---|---|
| Copy | One-time uploads, archiving data | Files are transferred once; no ongoing sync |
| Sync | Keeping folders in sync | Deletes files at destination that don't exist at source |
| Mount | Interactive work, browsing files | Requires stable connection; slower for large operations |
Copy vs Sync¶
- Copy: Transfers files from source to destination. Safe for uploads - won't delete anything.
- Sync: Makes destination identical to source. Use with caution - files only at destination will be deleted.
# Copy: safe, additive
rclone copy /local/data "cropxr:study_folder"
# Sync: makes destination match source (destructive)
rclone sync /local/data "cropxr:study_folder"
Sync deletes files
rclone sync will delete files at the destination that don't exist at the source. Always use --dry-run first to preview changes.
When to Mount¶
Mounting is useful when you need to:
- Browse files interactively
- Work with software that expects local file paths
- Make small edits without downloading entire files
Mounting is not recommended for:
- Large batch uploads (use
copyinstead) - Unreliable network connections
- Long-running operations
Working with Permissions¶
Research Drive permissions affect what you can access via Rclone. See Sharing Data for details on managing permissions.
What You Can See¶
Rclone can only access folders that are:
- Owned by you, or
- Shared with you (appears in your root directory)
Upload Permissions¶
Before uploading, ensure you have write access to the destination folder. If you only have read access, uploads will fail. See Getting Access if you need to request permissions.
Best Practice Workflow¶
- Request folder access from the folder owner or data team
- Verify access by listing the folder:
rclone lsd cropxr:folder_name - Upload data using copy or sync
- Notify the data team if permissions need adjustment after upload
Permissions after upload
Once you upload data to a shared folder, the folder owner controls access. Coordinate with your team about who should have read/write access. See Sharing Data for sharing guidelines.
Quickstart¶
Once configured, use these commands:
# Copy files to Research Drive
rclone copy /local/path "cropxr:destination/folder"
# Mount Research Drive as a local folder
rclone mount "cropxr:folder" /mount/point --vfs-cache-mode writes
Requirements¶
Version Requirement
Rclone version 1.63.1 or newer is required for Nextcloud compatibility. Earlier versions will fail with a chunked upload error.
Installation¶
- Download from rclone.org/downloads
- Extract to a folder (e.g.,
C:\rclone) - Run commands from that folder, or add it to your PATH
Verify installation:
Configuration¶
Step 1: Generate App Password¶
- Log in to Research Drive
- Go to Settings (top right) > Security
- Under "Devices & sessions", click Create new app password
- Copy the password immediately (it is only shown once)
Step 2: Obscure the Password¶
Save the output string for the next step.
Step 3: Get Your WebDAV URL¶
- In Research Drive, go to Files
- Click Settings (bottom left corner) > WebDAV
- Copy the URL (format:
https://cropxr.data.surf.nl/remote.php/dav/files/your@email.com/)
Step 4: Create Configuration File¶
Create or edit the rclone configuration file:
| OS | Path |
|---|---|
| Linux/macOS | ~/.config/rclone/rclone.conf |
| Windows | %USERPROFILE%\.config\rclone\rclone.conf |
Add the following:
[cropxr]
type = webdav
url = https://cropxr.data.surf.nl/remote.php/dav/files/your@email.com
vendor = nextcloud
user = your@email.com
pass = YOUR_OBSCURED_PASSWORD
Replace your@email.com with your login email and YOUR_OBSCURED_PASSWORD with the output from Step 2.
Step 5: Test Connection¶
This should list the folders in your Research Drive.
Usage¶
Copying Files¶
For large files, add a timeout (approximately 10 minutes per GB):
Mounting as Local Drive¶
First install WinFsp (requires admin privileges).
Path formats
Paths can be either the full path or the shared folder name:
- Full path:
cropxr:cropxr (Projectfolder)/investigations/inv_folder/study_folder - Shared folder:
cropxr:study_folder
Best practice
Mount a specific folder (e.g., your study folder) rather than the root. This improves performance and simplifies navigation.
Command Flags Explained¶
| Flag | Purpose |
|---|---|
--vfs-cache-mode writes |
Caches files during upload for reliable transfers |
--use-cookies |
Maintains session with Nextcloud/WebDAV servers |
-v |
Verbose output for monitoring progress |
--timeout |
Maximum time for a single operation |
Troubleshooting¶
| Issue | Solution |
|---|---|
| "chunked upload" error | Update rclone to version 1.63.1 or newer |
| Connection timeout | Add --timeout 60m or increase the value |
| Permission denied | Verify your app password and username |
| Mount not working (Windows) | Ensure WinFsp is installed |
When reporting issues
Include the rclone command you ran, the error message, and your rclone version (rclone --version). For Research Drive platform issues, see SURF servicedesk.
See Also¶
- Uploading Data - Overview of upload methods
- Via Browser - Simpler option for small uploads
- Via NextCloud - Desktop sync client alternative
- Sharing Data - Managing folder permissions
External References¶
SURF Research Drive¶
Rclone¶
- Rclone documentation
- Rclone WebDAV - WebDAV backend configuration
- Rclone copy - Copy command reference
- Rclone sync - Sync command reference
- Rclone mount - Mount command reference
- Rclone flags - Global flags reference