Copying Files
Last updated on 2026-08-24 | Edit this page
Estimated time: 25 minutes
Overview
Questions
- How do I copy files from HPC to cloud storage?
- What does the
remote:pathsyntax mean? - How do I preview changes before copying?
Objectives
- Understand rclone’s
remote:pathsyntax - Copy files between local, Box, and OneDrive with
rclone copy - Use
--dry-runto preview operations before executing - Verify transfers with
rclone check
Understanding remote:path Syntax
The Foundation: remote:path Notation
The most important concept in rclone is the remote:path
syntax. When you use an rclone command, you reference cloud storage
using:
remote_name:path/to/file
remote_name is the name you gave during
configuration (pomona-box, pomona-onedrive,
etc.) path/to/file is the location within that
remote
Copying Files: rclone copy
The rclone copy command copies files from a
source to a destination, adding new files to the destination
without removing existing ones.
Local to Cloud Examples
Copy a file from your HPC home directory to Box:
Copy a local folder to Box:
Dry-Run: Preview Before Copying
Safe Testing: Always Use –dry-run First
Before running a copy, use --dry-run to preview what
will happen:
Expected output:
2026/03/05 15:10:22 INFO : file1.csv: Copied (dry run)
2026/03/05 15:10:22 INFO : subfolder/file2.txt: Copied (dry run)
2026/03/05 15:10:22 INFO : Transferred: 2 files
2026/03/05 15:10:22 INFO : Total size: 5.3M
This shows what would be copied without actually doing it.
Always use --dry-run on large
operations!
Checking File Integrity: rclone check
Verify that files were copied correctly by comparing checksums:
Expected output if all match:
2026/03/05 15:25:00 INFO : Checks completed successfully
The dry-run should show:
2026/03/05 15:10:22 INFO : file1.txt: Copied (dry run)
2026/03/05 15:10:22 INFO : subfolder/file2.txt: Copied (dry run)
After executing, verify with rclone tree:
/
├── file1.txt
└── subfolder/
└── file2.txt
The folder structure on Box should match your local
~/test-data exactly.
The dry-run should show both files being copied from Box to OneDrive. After executing:
Expected output:
/
├── file1.txt
└── subfolder/
└── file2.txt
This confirms cloud-to-cloud transfer works. The folder structure on OneDrive mirrors what was on Box.
- The remote:path syntax (e.g., pomona-box:/folder/file.txt) is fundamental to all rclone commands
- rclone copy is additive and safe – it never deletes files at the destination
- The –dry-run flag previews changes without making them and should always be used before large operations
- Understanding the difference between local paths (~/file.txt) and remote paths (remote:path) is critical for avoiding mistakes