rclone: Cloud Storage Made Simple
rclone is your go-to solution for efficiently copying files between any cloud storage services or local storage. Unlike downloading and re-uploading, rclone transfers happen directly between cloud providers at maximum speed, making it perfect for migrations and backups.
Getting Started
Section titled “Getting Started”Installation
Section titled “Installation”macOS:
brew install rcloneLinux:
sudo -v ; curl https://rclone.org/install.sh | sudo bashWindows: Download from rclone.org/downloads
Verify Installation:
rclone versionUnderstanding Remotes
Section titled “Understanding Remotes”In rclone, a “remote” is a configured connection to a storage provider (like Google Drive, Dropbox, S3, etc.). Before you can transfer files, you need to set up at least one remote.
Think of it like this:
gdrive:= Your configured Google Drive connectiondropbox:= Your configured Dropbox connection- Local paths = Just regular file paths like
~/Documents/
Configure Your First Remote
Section titled “Configure Your First Remote”Start the configuration wizard:
rclone configInteractive Setup:
n) New remoted) Delete remoter) Rename remotec) Copy remotes) Set configuration passwordq) Quit config
Choose: nExample: Setting up Google Drive:
# Step 1: Give it a name (e.g., "gdrive" or "personal")name> gdrive
# Step 2: Choose storage typeStorage> drive # or type number for Google Drive
# Step 3: Leave client_id and client_secret blank (press Enter)client_id>client_secret>
# Step 4: Choose full accessscope> 1
# Step 5: Skip advanced configEdit advanced config? n
# Step 6: Auto config (opens browser for authentication)Use auto config? y# Browser opens, log in to Google, grant permissions
# Step 7: Not a Shared DriveConfigure this as a team drive? n
# Step 8: ConfirmYes this is OK> yQuick Setup for Common Services:
Google Drive:
rclone config create gdrive drive# Opens browser for authenticationDropbox:
rclone config create dropbox dropbox# Opens browser for authenticationAmazon S3:
rclone config create s3 s3 \ provider AWS \ access_key_id YOUR_ACCESS_KEY \ secret_access_key YOUR_SECRET_KEYVerify Your Remote
Section titled “Verify Your Remote”List all configured remotes:
rclone listremotesTest the connection:
# List files in root of remoterclone ls gdrive:/
# Check remote detailsrclone about gdrive:List directories:
rclone lsd gdrive:/Our Recommended Command
Section titled “Our Recommended Command”rclone copy source:path destination:path -P --stats=5sUnderstanding Each Flag
Section titled “Understanding Each Flag”The Essential Combination: -P –stats=5s
-P(Progress): Shows transfer progress and file count- Displays current file being transferred
- Shows percentage of files completed
- Allows resuming if interrupted (for compatible remotes)
--stats=5s(Statistics): Updates transfer statistics every 5 seconds- Shows bytes transferred / total bytes with percentage
- Displays current speed
- Estimates time remaining (ETA)
-v(Verbose): Optional - shows file-by-file transfer details--log-file(Logging): Write progress to a file for monitoring
Essential Commands
Section titled “Essential Commands”List Files and Directories:
# List all files with sizesrclone ls gdrive:/
# List only directoriesrclone lsd gdrive:/
# List with details (like ls -l)rclone lsl gdrive:/
# Tree viewrclone tree gdrive:/folderCheck Space and Usage:
# Show storage quota and usagerclone about gdrive:
# Get size of a folderrclone size gdrive:/folderBasic File Operations:
# Copy files (source stays intact)rclone copy source:path dest:path -P
# Move files (removes from source)rclone move source:path dest:path -P
# Sync (make dest identical to source)rclone sync source:path dest:path -P
# Delete filesrclone delete gdrive:/folder/file.txt
# Remove empty directoriesrclone rmdirs gdrive:/folderReal-World Examples
Section titled “Real-World Examples”Google Drive to Enterprise Account:
# Simple copy with progressrclone copy personal:/ enterprise:/migrated-files -P --stats=5s
# With logging for background monitoringrclone copy personal:/ enterprise:/migrated-files \ --log-file=/tmp/migration.log \ --stats=5s \ --stats-log-level NOTICE \ -vMonitor Log File in Real-Time:
# In another terminaltail -f /tmp/migration.log
# Or with auto-refresh every 2 secondswatch -n 2 'tail -50 /tmp/migration.log'Background Transfer:
# Start transfer and disconnect from terminalnohup rclone copy personal:/ enterprise:/migrated-files \ --log-file=/tmp/migration.log \ --stats=5s \ --stats-log-level NOTICE \ -v > /dev/null 2>&1 &
# Check progress latertail -f /tmp/migration.logCloud to Cloud (S3, Dropbox, OneDrive, etc.):
# Copy from Google Drive to AWS S3rclone copy gdrive:/folder s3:/bucket-name -P --stats=5s
# Copy from Dropbox to AWS S3 (server-side, no local download)rclone copy dropbox:/backup s3:/archive -P --stats=5sSmart Backups with Filters:
# Copy excluding certain file typesrclone copy ~/source gdrive:/backup \ --exclude '*.tmp' \ --exclude 'node_modules/' \ --exclude '.git/' \ -P --stats=5s
# Copy only certain file typesrclone copy ~/source gdrive:/backup \ --include '*.pdf' \ --include '*.docx' \ -P --stats=5sSync (Mirror) vs Copy:
# Copy - adds new/updated files (doesn't delete)rclone copy source:/ dest:/ -P
# Sync - makes destination identical to source (deletes extra files!)rclone sync source:/ dest:/ -P --delete
# IMPORTANT: Always use --dry-run before sync!rclone sync source:/ dest:/ -P --delete --dry-runPro Tips
Section titled “Pro Tips”Always Use Dry-Run First:
# Test what will happen without making changesrclone copy source:/ dest:/ --dry-run -vv
# Same for sync operationsrclone sync source:/ dest:/ --dry-run --delete -vvRunning on a Remote Server or VM:
# Start in background with nohup (stays running after disconnection)nohup rclone copy source:/ dest:/ --stats=5s --log-file=/tmp/rclone.log -v &
# Check status from another SSH sessiontail -f /tmp/rclone.log
# Stop the processpkill -f "rclone copy"Understanding Output:
Transferred: 1.2G / 5.6G (21%), 245 / 1200 files, ETA 15m 32s1.2G / 5.6G (21%)= Data transferred vs total (percentage)245 / 1200 files= Files transferred vs totalETA 15m 32s= Estimated time remaining
Checking Progress Without Verbose Output:
# Clean, simple progress displayrclone copy source:/ dest:/ -P --stats=10s
# Very verbose - see every filerclone copy source:/ dest:/ -P -vv --stats=5sExclude Patterns:
# Exclude multiple patternsrclone copy source:/ dest:/ \ --exclude '*.tmp' \ --exclude '.cache/**' \ --exclude '__pycache__/**' \ -P --stats=5sCreative Use Cases
Section titled “Creative Use Cases”Automated Photo Organization:
# Sort photos by date into year/month foldersrclone copy ~/Photos gdrive:/organized-photos \ --drive-upload-cutoff 128M \ --transfers 8 \ -P --stats=5sMulti-Cloud Redundancy:
#!/bin/bash# Backup to multiple cloud providers simultaneouslyrclone copy ~/important-docs gdrive:/backup -P --stats=5s &rclone copy ~/important-docs dropbox:/backup -P --stats=5s &rclone copy ~/important-docs onedrive:/backup -P --stats=5s &waitecho "All backups completed!"Encrypt Before Upload:
# Use rclone's built-in encryptionrclone copy ~/sensitive-files encrypted-remote:/secure-backup \ -P --stats=5s# Configure encrypted remote with: rclone configMedia Server Cloud Storage:
# Mount cloud storage as local directoryrclone mount gdrive:/media ~/cloud-media \ --vfs-cache-mode writes \ --daemon
# Access files at ~/cloud-media without downloading everythingScheduled Incremental Backups:
#!/bin/bash# Daily backup script (add to cron)DATE=$(date +%Y-%m-%d)rclone copy ~/Documents gdrive:/backups/$DATE/ \ --max-age 24h \ --log-file=/var/log/rclone-backup.log \ -P --stats=5sArchive Old Files to Cheap Storage:
# Move files older than 1 year to Glacierrclone move gdrive:/active-files s3-glacier:/archive \ --min-age 365d \ -P --stats=5s --dry-run # Remove --dry-run when readyStopping Background Transfers
Section titled “Stopping Background Transfers”Kill by process name:
# Gracefully stop the transferpkill -TERM -f "rclone copy"
# Immediate stoppkill -f "rclone copy"Kill by process ID:
# Find the processps aux | grep "rclone copy"
# Kill it (replace 12345 with actual PID)kill 12345If using jobs command:
# List background jobsjobs
# Kill job 1kill %1Managing Remotes
Section titled “Managing Remotes”List existing remotes:
rclone listremotesEdit a remote:
rclone config update gdrive # Update specific settings# Or use interactive moderclone config# Then choose: e) Edit existing remoteDelete a remote:
rclone config delete old-remoteShow config file location:
rclone config filePassword protect your config:
rclone config# Choose: s) Set configuration passwordCopy remote configuration to another machine:
# On first machinecat ~/.config/rclone/rclone.conf
# On second machine, create same file with contents# Or copy the file directlyTroubleshooting Tips
Section titled “Troubleshooting Tips”- Test First: Always use
--dry-runbefore important transfers - Check Permissions: Ensure you have access to both source and destination
- Monitor Progress: Use
--stats=5sto track transfer in real-time - Handle Large Files: Rclone automatically chunks large uploads
- Network Issues: Rclone handles transient failures gracefully
- Rate Limits: Google Drive has 750GB/day per account limit
- Config Issues: Run
rclone config reconnect gdrive:to refresh authentication
If Transfer Fails:
# For compatible cloud services, re-run the same command# It will skip already-transferred files and continuerclone copy source:/ dest:/ -P --stats=5s
# Note: Resume depends on the remote type (works best with Google Drive)Verbose Debugging:
# Maximum detail - use multiple -v flagsrclone copy source:/ dest:/ --dry-run -vvv --log-file=/tmp/debug.logKey Differences from rsync
Section titled “Key Differences from rsync”| Feature | rsync | rclone |
|---|---|---|
| Local Files | ✓ | ✓ |
| Cloud Storage | ✗ | ✓ (70+ providers) |
| Bandwidth Efficient | ✓ (delta sync) | Limited (copies whole files) |
| Resume Capability | ✓ | Depends on remote type |
| Server-Side Transfer | ✗ | ✓ (cloud to cloud) |
| Compression | ✓ | Limited |
| Encryption | ✗ | ✓ (built-in) |
Common Issues and Solutions
Section titled “Common Issues and Solutions”“Failed to create file system” Error:
# Check if remote existsrclone listremotes
# Test connectionrclone lsd remote-name:
# Reconfigure if neededrclone config reconnect remote-name:Token Expired:
# Refresh the authenticationrclone config reconnect gdrive:# Browser opens for re-authenticationSlow Transfers:
# Increase parallel transfersrclone copy source:/ dest:/ \ --transfers=16 \ --checkers=32 \ -P --stats=5s
# Use compression for slow connectionsrclone copy source:/ dest:/ --compress -PCan’t Find Config File:
# Show config locationrclone config file
# Create new config if missingrclone configSupported Cloud Providers
Section titled “Supported Cloud Providers”rclone supports 70+ storage providers including:
- Cloud Storage: Google Drive, Dropbox, OneDrive, Box, pCloud
- Object Storage: Amazon S3, Google Cloud Storage, Azure Blob, Backblaze B2
- File Hosting: Mega, Yandex Disk, Mail.ru Cloud
- Servers: SFTP, FTP, WebDAV, HTTP
- Local: Local filesystem, SMB/CIFS
Full list: rclone.org/overview
Quick Reference Card
Section titled “Quick Reference Card”| Command | Purpose |
|---|---|
rclone config |
Set up remotes |
rclone listremotes |
Show configured remotes |
rclone ls remote: |
List files |
rclone lsd remote: |
List directories |
rclone copy src: dst: |
Copy files |
rclone sync src: dst: |
Mirror (deletes extras) |
rclone move src: dst: |
Move files |
rclone delete remote:path |
Delete files |
rclone about remote: |
Show storage info |
rclone mount remote: /path |
Mount as filesystem |
Prerequisites
Section titled “Prerequisites”- rclone installed:
brew install rcloneor visit rclone.org/install - At least one remote configured:
rclone config - Cloud storage account(s) with valid credentials
- Network access to cloud provider
- Sufficient quota/storage space
- Appropriate permissions on both source and destination