Skip to main content

What is Rclone

Rclone is a CLI tool that copies and synchronizes files between local disks, servers, and cloud providers through a consistent command interface.

Learning Focus

Use this lesson to understand rclone's mental model (remotes, paths, and safety) so you can run production sync jobs without surprises.

Core Idea

You define a provider once as a remote, then reuse the same command shape for every provider.

Concept Overview​

Rclone is not "one cloud" tooling. It is an abstraction layer:

  • A backend implements a storage system (S3, B2, R2, Drive, OneDrive, local).
  • A remote is your configured instance of a backend (credentials + endpoint + defaults).
  • A remote path uses remote:prefix/path addressing.

Rclone Is Great For​

ScenarioWhy rclone works
Offsite backupsWorks with object storage APIs
Multi-provider portabilitySame command shape across providers
Integrity checksrclone check, size audits, hash listings
Scheduled jobsGood logging, retry behavior, non-interactive operation

Rclone Is Not The Best For​

ScenarioBetter tool
Server-to-server delta copies over SSHrsync
Long-term snapshot history + deduprestic
Git-tracked code deploymentsgit + CI

Why Teams Use Rclone​

NeedRclone capabilityPractical effect
Multi-cloud backup70+ supported backendsOne command model across S3, B2, R2, Drive, and more
Hybrid architectureLocal + remote copy/syncKeep fast local restore and durable offsite copy
Data integrity checksrclone check, hashes, size checksDetect drift and corruption early
Safer operations--dry-run, logs, retriesLower risk in production automation

Architecture at a Glance​

Terminology You Must Know​

TermMeaningExample
RemoteNamed configuration for a backendremote-prod
BackendStorage driver types3, b2, drive
Bucket/containerTop-level storagemy-bucket
PrefixFolder-like path inside a bucketbackups/app/
ObjectA file stored in object storagebackups/app/db.sql.gz
Mirror syncDestination becomes the sourcerclone sync SRC DST

Command Shape​

rclone-command-shape.sh
rclone <command> <source> <destination> [flags]

# example
rclone sync /srv/uploads remote-prod:site/uploads --dry-run
warning

Most incidents come from mistargeted sync. Build the habit: preflight path checks + --dry-run + logs.

Command Families​

FamilyExamplesUse when
Transfercopy, sync, moveSending/changing data
Listingls, lsl, lsd, treeAuditing structure
Validationcheck, md5sum, sha1sumVerifying consistency
Maintenancedelete, purge, mkdir, rmdirLifecycle and cleanup
warning

sync can remove files at destination that do not exist at source. Always test with --dry-run first.

How Rclone Compares to Rsync (Mental Model)​

  • Rsync usually targets filesystems.
  • Rclone often targets object storage where "folders" are prefixes.

Practical Use Cases​

Backup a Dataset to Cloud​

rclone sync /backup/app/current remote-prod:backups/app/current --progress
rclone check /backup/app/current remote-prod:backups/app/current --one-way

Publish Build Artifacts​

rclone copy ./dist remote-prod:releases/my-app/2026-02-11 --checksum

Common Mistakes​

MistakeWhat happensSafer habit
Running sync without dry-runUnexpected deletesAlways preview with --dry-run
Using remote root as destinationData lands in wrong prefixAlways use explicit remote:prefix/path
No post-transfer verificationDrift stays hiddenAdd rclone check for critical data

Hands-On Practice​

Try these on a non-production remote path:

rclone listremotes
rclone lsd remote-prod:
rclone mkdir remote-prod:labs/rclone
rclone rmdir remote-prod:labs/rclone

Quick Reference​

Quick Reference​

# list remotes
rclone listremotes

# list top-level directories in a remote
rclone lsd remote-prod:

# safe preview sync
rclone sync /srv/data remote-prod:data --dry-run

What's Next​