🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

rclone Command

Intermediate File Management man(1)

Sync files to and from cloud storage

📅 Updated: Mar 16, 2026
SYNTAX
rclone COMMAND [FLAGS] SOURCE:PATH DEST:PATH

What Does rclone Do?

The rclone command is a powerful cloud storage synchronization tool — often called "the Swiss Army knife of cloud storage" or "rsync for cloud". It supports over 70 cloud storage providers including AWS S3, Google Drive, Dropbox, Azure Blob Storage, Backblaze B2, Wasabi, MinIO, SFTP servers, and many more.

rclone can copy, sync, move, and mount cloud storage as local filesystems. It supports server-side copying, chunked uploads for large files, bandwidth limiting, checksumming, encryption at rest, and deduplication. For backup strategies, rclone is invaluable — enabling automated offsite backups to any cloud provider.

The tool is designed for unattended operation in cron jobs and scripts. It provides detailed logging, dry-run mode, filter rules (include/exclude patterns), and transfer statistics. rclone can also serve cloud storage over HTTP, WebDAV, FTP, SFTP, or DLNA, and mount cloud storage as a FUSE filesystem.

Options & Flags

OptionDescriptionExample
config Interactive configuration wizard for adding remotes rclone config
copy Copy files from source to destination rclone copy /data remote:backup/data
sync Sync source to destination (delete extras at dest) rclone sync /data remote:backup/data
move Move files from source to destination rclone move /tmp/uploads remote:storage/uploads
mount Mount remote as local filesystem (FUSE) rclone mount remote:bucket /mnt/cloud --daemon
ls/lsd/lsf List files, directories, or formatted listing rclone ls remote:bucket
--dry-run Preview what would be transferred rclone sync /data remote:backup --dry-run
--progress Show real-time transfer progress rclone copy /data remote:backup -P
--bwlimit Limit bandwidth usage rclone sync /data remote:backup --bwlimit 10M
serve Serve remote over HTTP/WebDAV/FTP/SFTP rclone serve http remote:bucket --addr :8080

Practical Examples

#1 Configure a remote

Interactive wizard to set up a new cloud storage remote. Supports OAuth flow for Google Drive, Dropbox, etc.
$ rclone config

#2 Backup to S3

Sync local backups to an S3 bucket. Files deleted locally are deleted from S3 too (mirror sync).
$ rclone sync /var/backups s3remote:mybucket/backups --progress

#3 Copy without deleting

Copy new/changed files to remote. Does NOT delete files at destination. Uses 8 parallel transfers.
$ rclone copy /data remote:bucket/data -P --transfers 8

#4 Encrypted backup

Copy to an encrypted remote (configured with rclone config using crypt type). Files encrypted at rest.
$ rclone copy /sensitive encrypted-remote:backup/

#5 Mount cloud storage

Mount Google Drive as a local filesystem. vfs-cache-mode full enables read-write caching for best performance.
$ rclone mount gdrive: /mnt/gdrive --vfs-cache-mode full --daemon

#6 Server-to-server transfer

Copy between cloud providers. With compatible services, uses server-side copy (no data through your machine).
$ rclone copy s3remote:source-bucket gcs-remote:dest-bucket --server-side

#7 Scheduled backup with cron

Cron entry for nightly 2 AM backup with logging. Add to crontab with crontab -e.
$ 0 2 * * * rclone sync /data remote:backup --log-file=/var/log/rclone.log --log-level INFO

#8 Check differences

Compare local and remote files. Reports missing, changed, and matching files.
$ rclone check /data remote:backup --combined report.txt

Tips & Best Practices

sync deletes files at destination: rclone sync makes the destination match source exactly — including deleting files. Use rclone copy if you only want to add new files without deleting.
Use --dry-run first: Always preview with --dry-run before sync operations: rclone sync /data remote:backup --dry-run. Shows exactly what would be transferred or deleted.
Filter files: Use --include/--exclude patterns: rclone copy /data remote:backup --include "*.sql" --exclude "*.tmp". Or use --filter-from file for complex rules.
Bandwidth scheduling: Limit bandwidth during work hours: --bwlimit "08:00,1M 18:00,off" — 1 MB/s during 8-18h, unlimited at night.
Install rclone: Install with: curl https://rclone.org/install.sh | sudo bash. Or: apt install rclone, dnf install rclone, brew install rclone.

Frequently Asked Questions

How do I backup files to cloud storage from Linux?
Install rclone, configure a remote (rclone config), then: rclone copy /data remote:backup -P. Use sync instead of copy for exact mirror. Schedule with cron for automated backups.
What is the difference between rclone copy and rclone sync?
copy only adds new/changed files to the destination. sync makes the destination an exact mirror — deleting files not present in the source. Use copy for additive backups, sync for mirrors.
Can rclone encrypt files?
Yes. Create an encrypted remote with rclone config (type: crypt). Files are encrypted before upload with AES-256 and optional filename encryption. The encryption key stays local.
How do I mount cloud storage as a local drive?
rclone mount remote:path /mnt/point --vfs-cache-mode full --daemon. Requires FUSE. The cloud storage appears as a regular directory. Use fusermount -u /mnt/point to unmount.
Is rclone faster than aws s3 sync?
rclone is often faster due to parallel transfers (default 4, configurable), server-side copy support, and chunked uploads. It also works with 70+ providers, not just S3.

Master Linux with Professional eBooks

Curated IT eBooks covering Linux, DevOps, Cloud, and more

Browse Books →