| name | rclone-cli |
| description | Rclone command-line cloud storage manager reference and usage guide. Use this skill whenever the user mentions rclone, or any task involving terminal-based cloud file operations such as upload, download, sync, copy, move, mount, or remote management. Triggers on S3-compatible storage, cloud-to-cloud transfer, remote mounts, backups, filtering, bandwidth control, encrypted remotes, bisync, and workflows across providers such as S3, OSS, COS, OBS, MinIO, Google Drive, Dropbox, OneDrive, and Azure Blob. Use even if the user does not explicitly say "rclone" when the work is clearly command-line cloud storage management.
|
| metadata | {"author":"chaunsin","version":"0.1"} |
rclone — The Swiss Army Knife of Cloud Storage
Rclone is a command-line program to manage files on cloud storage. It is a feature-rich alternative to cloud vendors' web storage interfaces. Over 70 cloud storage products support rclone including S3 object stores, business & consumer file storage services, and standard transfer protocols.
Rclone has powerful cloud equivalents to the unix commands rsync, cp, mv, mount, ls, ncdu, tree, rm, and cat. It preserves timestamps and verifies checksums at all times. Transfers can be restarted from the last good file.
Official resources: rclone.org | Docs | Commands | Install | Forum | GitHub
Prerequisites
Before using rclone, verify it is installed:
rclone --version
sudo -v ; curl https://rclone.org/install.sh | sudo bash
sudo -v ; curl https://rclone.org/install.sh | sudo bash -s beta
For offline/manual installation, use the bundled script at scripts/install.sh.
Security Warnings
IMPORTANT: Rclone is extremely powerful and can irreversibly modify or delete data on cloud storage.
Pay close attention to the following safety guidelines:
- Always use
--dry-run first when running sync, move, delete, or purge commands. This shows what would happen without actually doing it.
- Use
--interactive / -i flag while learning rclone to avoid accidental data loss. It asks for confirmation before each destructive operation.
- Never expose credentials in plain text on the command line. Use
rclone config to store credentials securely, or use environment variables.
- Private keys and tokens (S3 secret keys, service account JSON, OAuth tokens) must never be committed to version control or logged. The config file
~/.config/rclone/rclone.conf contains sensitive data — protect it with chmod 600.
rclone purge ignores all filters — it deletes everything under the specified path. Use with extreme caution.
rclone sync makes dest identical to source — files in dest that are not in source will be DELETED. Always verify with --dry-run first.
- Remote control API (
--rc) should bind to localhost only by default. Exposing it without authentication (--rc-htpasswd) allows anyone to control your rclone instance.
- Mount operations can cause data loss if the mount is interrupted during writes. Use
--vfs-cache-mode full for safer writes.
Quick Reference
Configuration
rclone config
rclone config show
rclone config show --redacted=false
rclone listremotes
rclone config create myremote s3 provider=AWS env_auth=true region=us-east-1
rclone config update myremote region=us-west-2
Basic Syntax
rclone subcommand [options] source:path dest:path
Source and destination paths use remote:path syntax. For local paths, just use /path/to/dir.
Core Commands
rclone ls remote:path
rclone lsd remote:path
rclone lsl remote:path
rclone lsf remote:path
rclone size remote:path
rclone tree remote:path
rclone copy /local/path remote:path
rclone copy remote:path /local/path
rclone copy remote1:path remote2:path
rclone sync --dry-run /local/path remote:path
rclone sync -i /local/path remote:path
rclone move /local/path remote:path
rclone delete remote:path
rclone purge remote:path
rclone check /local/path remote:path
rclone checksum remote:path
rclone cryptcheck crypt:path
rclone mkdir remote:path
rclone rmdir remote:path
rclone rmdirs remote:path
rclone cat remote:path/file.txt
rclone dedupe remote:path
rclone about remote:
rclone version
Filtering
Filter rules determine which files rclone processes. Always test with --dry-run and -vv.
rclone copy /src /dst --include "*.jpg"
rclone copy /src /dst --include-from filter-file.txt
rclone copy /src /dst --exclude "*.tmp"
rclone copy /src /dst --exclude-from exclude-file.txt
rclone sync /src /dst --filter "+ *.jpg" --filter "- *"
rclone sync /src /dst --filter-from rules.txt
rclone copy /src /dst --min-size 1M --max-size 10G
rclone copy /src /dst --min-age 7d --max-age 30d
Filter pattern syntax:
* matches any sequence of non-separator characters
** matches any sequence including separators
? matches any single non-separator character
{a,b} matches pattern alternatives
{{regexp}} matches using Go regexp
Global Flags (Most Common)
-v
-vv
--log-level LEVEL
--dry-run
-i, --interactive
--ignore-existing
-I, --ignore-times
--transfers N
--checkers N
--bwlimit RATE
--max-transfer SIZE
-c, --checksum
--size-only
--multi-thread-streams N
-P, --progress
--config STRING
-C, --no-check-dest
Mount
rclone mount remote:path /mnt/remote
rclone mount remote:path /mnt/remote \
--vfs-cache-mode full \
--vfs-cache-max-size 10G \
--vfs-read-chunk-size 128M
fusermount -u /mnt/remote
umount /mnt/remote
Serve
rclone serve http remote:path
rclone serve webdav remote:path
rclone serve sftp remote:path
rclone serve ftp remote:path
rclone serve s3 remote:path
rclone serve dlna remote:path
rclone serve restic remote:path
rclone serve docker remote:path
Encryption (Crypt Remote)
rclone config
rclone copy /local/files crypt:path
rclone ls crypt:path
rclone cryptcheck crypt:path
Detailed Reference Files
For in-depth information, consult these reference files:
These files are converted from the official Hugo-based rclone documentation under
testdata/rclone/docs/. Treat any remaining Hugo shortcode or template syntax
as a conversion bug: replace it with normal Markdown, a static table, or an
official URL before relying on it in an answer.
| File | Content | When to read | Official link |
|---|
references/usage.md | Full usage guide: syntax, config, remote paths, options | Understanding advanced rclone behavior | Docs |
references/flags.md | Complete global flags reference | Looking up specific flag options | Flags |
references/filtering.md | Filtering, includes/excludes, patterns | Building complex filter rules | Filtering |
references/rc.md | Remote control / HTTP API | Using rclone's API for programmatic control | RC API |
references/bisync.md | Bidirectional sync between two paths | Setting up two-way sync | Bisync |
references/crypt.md | Encrypted remote configuration | Setting up encrypted cloud storage | Crypt |
references/cache.md | Cache backend and directory caching | Optimizing performance with caching | Cache |
references/chunker.md | Transparent file chunking | Handling large files on limited remotes | Chunker |
references/union.md | Union backend (merge multiple remotes) | Combining multiple storage backends | Union |
references/combine.md | Combine backend (unified namespace) | Unified view of multiple remotes | Combine |
references/hasher.md | Hasher backend for checksum handling | Adding hash support to remotes | Hasher |
references/overview.md | Cloud storage system feature comparison | Comparing provider capabilities | Overview |
references/install.md | Detailed installation instructions | Troubleshooting installation | Install |
references/docker.md | Docker usage guide | Running rclone in Docker | Docker |
references/faq.md | Frequently asked questions | Troubleshooting common issues | FAQ |
references/commands/ | Individual command documentation | Detailed command usage | Commands |
Popular Provider References
For configuring specific cloud storage providers, read the corresponding file in
references/providers/ when present. Some virtual/backing providers, such as
crypt, cache, chunker, union, combine, and hasher, live as top-level
files in references/ because they are cross-provider backends rather than
single cloud services.
s3.md — Amazon S3 / compatible (Official)
drive.md — Google Drive (Official)
dropbox.md — Dropbox (Official)
onedrive.md — Microsoft OneDrive (Official)
azureblob.md — Azure Blob Storage (Official)
b2.md — Backblaze B2 (Official)
googlecloudstorage.md — Google Cloud Storage (Official)
sftp.md — SFTP (Official)
webdav.md — WebDAV (Official)
swift.md — OpenStack Swift (Official)
ftp.md — FTP (Official)
- And 60+ more providers — each has a page at
https://rclone.org/<name>/
Command References
For detailed command documentation, read the corresponding file in references/commands/:
rclone_copy.md, rclone_sync.md, rclone_move.md — transfer commands
rclone_mount.md — FUSE mount
rclone_serve_*.md — various serve modes
rclone_config*.md — configuration management
rclone_bisync.md — bidirectional sync
- And 80+ more commands — each has a page at
https://rclone.org/commands/<command>/
Common Workflows
Initial Setup
rclone config
rclone lsd remote:
Backup Local to Cloud
rclone sync --dry-run -P /home/user/documents remote:backup/documents
rclone sync -P /home/user/documents remote:backup/documents
Cloud-to-Cloud Migration
rclone copy --dry-run -P source_remote:path dest_remote:path
rclone copy -P --transfers 8 source_remote:path dest_remote:path
Restore from Cloud
rclone copy --dry-run remote:backup/documents /home/user/restored
rclone copy -P remote:backup/documents /home/user/restored
Bandwidth-Limited Transfer
rclone copy --bwlimit 10M -P /data remote:backup
Encrypted Backup
rclone config
rclone sync -P /sensitive-data crypt:backup
Scheduled Backup (cron)
0 2 * * * rclone sync -P /data remote:backup >> /var/log/rclone.log 2>&1