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

CommandWhat it does
rclone copy src dstCopy files from source to destination
rclone sync src dstMake destination identical to source (deletes extra files)
rclone move src dstMove files from source to destination
rclone delete remote:pathDelete files at path
rclone purge remote:pathDelete path and all contents
rclone mkdir remote:pathCreate a directory
rclone rmdir remote:pathRemove an empty directory
rclone check src dstCheck if files match between source and destination
rclone ls remote:pathList files with size
rclone lsd remote:pathList directories only
rclone lsf remote:pathList files and directories in parseable format
rclone size remote:pathGet total size and file count
rclone tree remote:pathShow directory tree
rclone cat remote:fileOutput file contents
rclone md5sum remote:pathGet 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 remotes

Essential 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 file

Performance 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 -P

For 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 DURATION

Pattern Examples

*.jpg           # All jpg files
**/*.jpg        # All jpg files in any subdirectory
/dir/**         # Everything in /dir
{*.mp4,*.mkv}   # mp4 or mkv files

Filter 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 1G

Mount & 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 :2022

Sync 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 syncs

Safety 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 100

Bandwidth 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 second

Encryption

# Create an encrypted remote (use rclone config)
# Then use it like any other remote:

rclone copy /secret encrypted-remote:
rclone mount encrypted-remote: /mnt/decrypted

Useful 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.txt

How is this guide?