Linux Command: rclone
Sync files to and from cloud storage
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.
Syntax
rclone COMMAND [FLAGS] SOURCE:PATH DEST:PATHKey Options
configโ Interactive configuration wizard for adding remotescopyโ Copy files from source to destinationsyncโ Sync source to destination (delete extras at dest)moveโ Move files from source to destinationmountโ Mount remote as local filesystem (FUSE)ls/lsd/lsfโ List files, directories, or formatted listing
Examples
Configure a remote
rclone configBackup to S3
rclone sync /var/backups s3remote:mybucket/backups --progressCopy without deleting
rclone copy /data remote:bucket/data -P --transfers 8Pro Tips
- rclone sync makes the destination match source exactly โ including deleting files. Use rclone copy if you only want to add new files without deleting.
- Always preview with --dry-run before sync operations: rclone sync /data remote:backup --dry-run. Shows exactly what would be transferred or deleted.
- Use --include/--exclude patterns: rclone copy /data remote:backup --include "*.sql" --exclude "*.tmp". Or use --filter-from file for complex rules.
Learn more: Full rclone reference โ
Related Resources