Cheatsheet
Quick reference for the most common rclone commands, flags, and patterns
A quick reference for the most useful rclone commands and patterns.
Core Commands
| Command | What it does |
|---|---|
rclone copy src dst | Copy files from source to destination |
rclone sync src dst | Make destination identical to source (deletes extra files) |
rclone move src dst | Move files from source to destination |
rclone delete remote:path | Delete files at path |
rclone purge remote:path | Delete path and all contents |
rclone mkdir remote:path | Create a directory |
rclone rmdir remote:path | Remove an empty directory |
rclone check src dst | Check if files match between source and destination |
rclone ls remote:path | List files with size |
rclone lsd remote:path | List directories only |
rclone lsf remote:path | List files and directories in parseable format |
rclone size remote:path | Get total size and file count |
rclone tree remote:path | Show directory tree |
rclone cat remote:file | Output file contents |
rclone md5sum remote:path | Get MD5 checksums |
Configuration
rclone config # Interactive config wizard
rclone config create name type # Create a new remote
rclone config delete name # Delete a remote
rclone config show # Show all remotes
rclone config file # Show config file path
rclone listremotes # List all configured remotesEssential Flags
--dry-run # Preview without making changes (ALWAYS use first!)
-v / --verbose # Show progress and details
-vv # Extra verbose
-P / --progress # Show real-time transfer progress
--stats 1s # Show stats every second
-i / --interactive # Confirm before each action
--log-file FILE # Write logs to filePerformance Tuning
--transfers N # Parallel file transfers (default: 4)
--checkers N # Parallel file checkers (default: 8)
--buffer-size SIZE # In-memory buffer per transfer (default: 16M)
--fast-list # Use fewer API calls (faster for large dirs)
--multi-thread-streams N # Parallel streams per file (default: 4)
--drive-chunk-size SIZE # Chunk size for Google Drive (default: 8M)# High-performance transfer
rclone copy src dst --transfers 16 --checkers 32 --fast-list -PFor more real-world examples of performant commands, check out Templates
Filtering Files
--include "PATTERN" # Include files matching pattern
--exclude "PATTERN" # Exclude files matching pattern
--filter "+ PATTERN" # Include (filter rule)
--filter "- PATTERN" # Exclude (filter rule)
--filter-from FILE # Load filters from file
--max-size SIZE # Skip files larger than SIZE
--min-size SIZE # Skip files smaller than SIZE
--max-age DURATION # Skip files older than DURATION
--min-age DURATION # Skip files newer than DURATIONPattern Examples
*.jpg # All jpg files
**/*.jpg # All jpg files in any subdirectory
/dir/** # Everything in /dir
{*.mp4,*.mkv} # mp4 or mkv filesFilter Examples
# Only sync images
rclone sync src dst --include "*.{jpg,png,gif}" --exclude "*"
# Exclude node_modules and .git
rclone copy src dst --exclude "node_modules/**" --exclude ".git/**"
# Only files modified in last 7 days
rclone copy src dst --max-age 7d
# Files between 1MB and 1GB
rclone copy src dst --min-size 1M --max-size 1GMount & Serve
# Mount remote as local filesystem
rclone mount remote:path /mnt/cloud --daemon
# Mount with caching for better performance
rclone mount remote:path /mnt/cloud \
--vfs-cache-mode full \
--vfs-cache-max-size 10G
# Unmount
fusermount -u /mnt/cloud # Linux
umount /mnt/cloud # macOS
# Serve over HTTP
rclone serve http remote:path --addr :8080
# Serve over WebDAV
rclone serve webdav remote:path --addr :8080
# Serve over SFTP
rclone serve sftp remote:path --addr :2022Sync Patterns
# Local → Cloud backup
rclone sync /home/user/documents remote:backup/documents
# Cloud → Local restore
rclone sync remote:backup/documents /home/user/documents
# Cloud → Cloud migration
rclone sync gdrive:data dropbox:data
# Two-way sync
rclone bisync /local remote:path --resync # Initial sync
rclone bisync /local remote:path # Subsequent syncsSafety Flags
--dry-run # Preview changes
--max-delete N # Abort if deleting more than N files
--backup-dir DST # Move deleted/changed files to backup location
--suffix SUFFIX # Add suffix to backup files
--immutable # Don't modify existing files# Safe sync with backup
rclone sync src dst \
--backup-dir remote:old-versions/$(date +%Y%m%d) \
--max-delete 100Bandwidth Control
--bwlimit RATE # Limit bandwidth (e.g., 10M, 1G)
--bwlimit "08:00,512k 18:00,10M 23:00,off" # Time-based limits
--tpslimit N # Limit transactions per secondEncryption
# Create an encrypted remote (use rclone config)
# Then use it like any other remote:
rclone copy /secret encrypted-remote:
rclone mount encrypted-remote: /mnt/decryptedUseful Combos
# Backup with progress and logging
rclone sync /data remote:backup \
-P \
--log-file backup-$(date +%Y%m%d).log \
--log-level INFO
# Mirror with verification
rclone sync src dst --checksum && rclone check src dst
# Find large files
rclone ls remote: --min-size 100M
# Count files
rclone size remote:path
# Delete old backups
rclone delete remote:backup --min-age 30d --dry-run
# Deduplicate (remove duplicates)
rclone dedupe remote:path --dedupe-mode newest
# Compare two locations
rclone check local:path remote:path --combined report.txtHow is this guide?