--- title: "Rclone: rsync for Cloud Storage" author: "Anshu Pathak" published: "2026-11-20T05:19:26.288Z" updated: "2026-11-20T05:19:26.288Z" url: "https://zyvop.com/rclone-rsync-for-cloud-storage-py12w" canonical: "https://zyvop.com/rclone-rsync-for-cloud-storage-py12w" tags: [] --- # Rclone: rsync for Cloud Storage Rclone is rsync for cloud storage: one CLI to copy, sync, encrypt and mount files across S3, Google Drive, SFTP and 70+ other backends. ![Cover image]() Rclone is a single-binary command-line tool that copies, syncs, encrypts and mounts files across cloud storage. It is written in Go, open source (MIT), and works with over 70 storage products: S3 and S3-compatible stores, Google Drive, Dropbox, OneDrive, Backblaze B2, SFTP, WebDAV, FTP and more. If you have ever wished `rsync` could talk to your bucket or your Drive, this is it. ```mermaid flowchart LR L[Local disk] <--> R([rclone]) S3[S3, R2, B2] <--> R GD[Drive, Dropbox, OneDrive] <--> R SF[SFTP, WebDAV, FTP] <--> R R --> X[mount, serve, crypt] ``` ## Install ```bash # Linux / macOS / BSD (official script) sudo -v ; curl https://rclone.org/install.sh | sudo bash # Windows winget install Rclone.Rclone rclone version ``` `brew install rclone` also works, but the Homebrew build does not support `rclone mount` on macOS. Use the official binary if you need mounting. To upgrade later, run `rclone selfupdate`, or use your package manager if that is how you installed it. ## Configure a remote Run `rclone config`, choose `n` (new remote), give it a name such as `gdrive`, pick the storage type and follow the prompts. OAuth-based services (Drive, Dropbox, OneDrive) open a browser; on a headless server, run `rclone authorize` on a machine that has one and paste the token back. ```bash rclone listremotes # list configured remotes rclone lsd gdrive: # list top-level directories rclone about gdrive: # quota and usage (if the backend supports it) rclone ncdu gdrive: # interactive disk-usage browser ``` Remotes are addressed as `name:path`. Run `rclone config file` to see where the config lives. It stores credentials, so treat it like a secret (rclone can encrypt it with a config password). ## The commands that matter | Command | What it does | | --- | --- | | `copy` | Copies new or changed files from source to destination. Never deletes anything at the destination. | | `sync` | Makes the destination identical to the source, **deleting** extra files at the destination. | | `move` | Copies, then deletes the source files. | | `check` | Compares source and destination (hashes or sizes) without changing anything. | | `bisync` | Two-way sync. Still documented as beta and an advanced command, so read the docs first. | ```bash rclone copy ~/Photos gdrive:Photos -P rclone sync ~/Documents s3:my-bucket/docs -P --dry-run rclone check ~/Documents s3:my-bucket/docs rclone copy s3:my-bucket/docs ~/restore -P # restore: swap source and destination ``` `-P` shows live progress. Useful tuning flags: `--transfers` (parallel file transfers, default 4), `--bwlimit 5M` (cap bandwidth), `--exclude "*.tmp"` and `--filter-from rules.txt`. Unlike rsync, trailing slashes make no difference. ## How rclone decides what to copy By default, rclone treats a file as unchanged when its size and modification time match. You can change that: - `--checksum` compares hashes instead of modification times. It is more reliable but slower, and only works when both sides support a common hash. - `--size-only` compares size alone. - `--ignore-times` skips the check and transfers everything. ## Sync safely `sync` is the command that bites. Build these habits: - **Preview first** with `--dry-run` (`-n`). - **Mind the order.** It is always `SOURCE DEST`. Swap them and you can delete the wrong side. - **Keep a safety net** with `--backup-dir s3:my-bucket/archive`, which moves deleted or overwritten files there instead of discarding them. It must be on the same remote as the destination and must not overlap the synced path. - **Set a limit** with `--max-delete 100` so a mistake cannot wipe thousands of files. - **Log it** with `--log-file rclone.log -v`. ## Mount a remote as a folder ```bash # Linux / macOS rclone mount gdrive: ~/gdrive --vfs-cache-mode full --daemon fusermount -u ~/gdrive # unmount on Linux (fusermount3 -u on newer distros, umount on macOS) ``` Linux needs FUSE, and Windows needs WinFsp. On macOS you need macFUSE or FUSE-T, or you can use `rclone nfsmount`, which avoids FUSE entirely. `--vfs-cache-mode full` makes applications that read and write files randomly behave properly. A mount is convenient, but it is still a network drive, so expect latency. For heavy work, `copy` the files locally first. ## Serve a remote Rclone can also expose any remote over HTTP, WebDAV, FTP, SFTP or S3, which is handy for sharing a bucket or a Drive folder with tools that expect one of those protocols. ```bash rclone serve webdav gdrive:Photos --addr 127.0.0.1:8080 --user me --pass secret ``` Binding to `127.0.0.1` keeps it local. If you expose it to a network, always set credentials. ## Encrypt with crypt Rclone's `crypt` backend wraps another remote and encrypts file contents (and, optionally, file and directory names) before upload. 1. Run `rclone config` and create a new remote of type `crypt`. 2. Point it at an existing path, for example `s3:my-bucket/encrypted`. 3. Set a password (and a salt, if prompted). ```bash rclone sync ~/Documents secret: -P ``` Back up the passwords. Without them, the data is unrecoverable. ## Automate it ```cron 0 2 * * * rclone sync /home/me/Documents s3:my-bucket/docs --log-file /var/log/rclone.log -v ``` Run `rclone check` now and then to confirm the backup matches the source, and try a test restore into an empty folder. A backup you never verify is a hope, not a backup. ## Gotchas - **Google Drive rate limits:** create your own OAuth client ID instead of using rclone's shared one. - **Keep it updated:** recent releases (v1.74.3 and v1.75.0) fixed a number of security issues, including ones in the `rc` server and the `serve` commands. If you expose `rclone rcd` or `rclone serve`, bind to localhost or require authentication. - **Bisync is beta:** do not use it as your only copy of important data. ## Wrap-up Install it, configure one remote, and run `copy` with `-P`. Add `--dry-run` before every `sync`, and you have a safe, scriptable way to move data between almost any storage you use.