Rclone

On this page 7

Rclone is an open-source command-line program that copies, synchronizes, verifies and mounts files between local file systems and more than 70 cloud and network storage backends, including S3-compatible object stores, SFTP servers, WebDAV and consumer drives. In backup & recovery for servers, administrators use it to move backup archives and file trees offsite, which makes it a practical building block of the 3-2-1 backup rule.

Rclone is often described as “rsync for cloud storage”. The comparison is useful but incomplete: Rclone speaks each provider’s native API, handles authentication, chunking and retries, and can add client-side encryption through a virtual layer. It is a transfer and synchronization tool, not a full backup system with deduplicated snapshots.

How Rclone moves data between remotes

Rclone works with remotes, which are named storage endpoints defined in a configuration file, usually rclone.conf. Each remote has a backend type (for example s3, sftp, b2 or drive) plus credentials and options. A command such as rclone sync /srv/backups offsite:bucket/server1 lists both sides, compares files and transfers only what differs.

The comparison relies on size and modification time by default and on hashes such as MD5 or SHA-1 when the backend supports them. Rclone runs parallel transfers (four by default) and parallel checkers, splits large files into multipart uploads, and retries failed operations with backoff. Because cloud object stores have no real directories or rename operation, Rclone translates file-system semantics into API calls, which is where most of its complexity lies.

Rclone can also wrap one remote inside another. These virtual backends add features without changing the storage provider. The following table lists the wrappers most relevant to server backups.

Virtual backendWhat it addsTypical backup use
cryptEncrypts file contents and namesStoring archives with an untrusted provider
chunkerSplits files above a size limitProviders with small maximum file sizes
unionMerges several remotes into one viewPooling free capacity across accounts
compressGzip compression of stored filesText-heavy data such as logs
aliasShort name for a remote pathSimpler scripts and cron entries
Virtual backends that extend a remote

Core Rclone commands and their risks

Most backup jobs use a handful of commands, and choosing the wrong one is the most common source of data loss with Rclone. The key distinction is whether the command deletes files on the destination.

CommandBehaviorDeletes at destination
copyTransfers new and changed filesNo
syncMakes destination identical to sourceYes
moveTransfers, then deletes the source copyNo, deletes source
checkCompares hashes or sizes on both sidesNo
bisyncTwo-way synchronization with state filesYes, on both sides
mountExposes a remote as a local file systemDepends on usage
Rclone commands used in backup work

A sync propagates deletions and corruption: if ransomware encrypts the source, the next run faithfully replaces the clean offsite copy. The --backup-dir flag mitigates this by moving overwritten and deleted files into a dated archive directory instead of discarding them. Running any destructive command first with --dry-run is a standard safety practice.

Rclone compared with rsync, Restic and BorgBackup

Rclone sits between a file synchronizer and a backup program. It replicates the current state of files well but does not keep versioned, deduplicated snapshots on its own, which is the core job of Restic and BorgBackup. The table below places it among neighboring tools in the backup & recovery toolbox.

ToolPrimary modelCloud object storageDeduplicated snapshots
RcloneFile copy and syncNative, very broadNo
rsyncDelta file sync over SSHNoNo
ResticEncrypted snapshot repositorySeveral backends, plus RcloneYes
BorgBackupEncrypted snapshot repositorySSH targets onlyYes
Rclone and related backup tools

The tools are frequently combined rather than chosen. Restic can use Rclone as a transport through its rclone: repository type, which gives Restic access to every Rclone backend. Another common pattern creates local Borg repositories and then uses Rclone to replicate the repository directory to object storage, so the snapshot logic and the offsite transfer remain separate layers.

Configuring Rclone for reliable server backups

A dependable Rclone job is scheduled, logged, verified and restricted. Administrators typically run it from cron or a systemd timer, write output with --log-file, and alert when the exit code is not zero. The following decision table summarizes common configuration choices.

SituationRecommended settingReason
Offsite copy of nightly archivescopy with retention on the bucketNo accidental deletion
Mirror of a file treesync with --backup-dirDeleted files remain recoverable
Untrusted storage providercrypt remote over the base remoteProvider sees only ciphertext
Limited office uplink--bwlimit with a time tableProtects daytime bandwidth
Ransomware concernObject Lock or append-only credentialsServer cannot erase old data
Integrity proofPeriodic rclone checkDetects silent mismatches
Configuration choices for backup jobs

Credential scope matters as much as encryption. The key stored in rclone.conf should be allowed to write but not delete wherever the provider supports it, and the configuration file itself should be protected with file permissions and an optional config password. An attacker who controls the server otherwise controls the offsite copy as well, which defeats the purpose of an immutable backup.

Limitations and common mistakes with Rclone

Rclone is reliable at moving bytes, yet several structural limits shape how it fits a recovery plan. Knowing them prevents false confidence during an actual restore.

  • No point-in-time history by itself: without --backup-dir or provider versioning, only the latest state exists.
  • Metadata gaps: ownership, permissions, hard links and extended attributes are not preserved on most object stores, so bare-metal restore needs a different tool.
  • Open files and databases: copying live database files produces inconsistent backups; dump or snapshot the database first.
  • API limits and costs: millions of small files trigger rate limiting and request charges; archive them before upload.
  • Lost crypt keys: encrypted data without the password and salt is permanently unrecoverable.
  • Untested restores: a successful upload log is not a restoration test; pull data back on a schedule.

The short version

Rclone is a universal mover for files. It takes folders from a server and copies them to almost any online storage service, or back again, using one consistent set of commands.

Think of it as a reliable courier that knows the entrance rules of dozens of different warehouses. It carries the boxes and checks that nothing went missing, but it does not keep a dated history of every box unless asked to. Used carefully, it is an easy way to keep a copy of important data far away from the server.

Where it makes a difference

A small hosting company runs twelve Linux web servers. Each night, a script creates compressed database dumps and site archives, about 40 GB per server, in a local backup directory. A systemd timer then runs rclone copy to an S3-compatible bucket in another region through a crypt remote, limited to 50 MB/s so customer traffic is not affected. The bucket uses Object Lock with a 30-day retention period, and the credentials on the servers cannot delete objects.

When one server is compromised and its local backups are encrypted by ransomware, the attacker cannot touch the offsite objects. The administrator provisions a clean server, runs rclone copy in the opposite direction, decrypts the archives automatically through the same crypt remote and restores the databases. The sites are back online within about four hours, with less than one day of data lost, because the offsite copy remained intact and verified by a weekly rclone check.