T3 Guide Β· V2.1 β commands, tuning profiles and production recipes
rclone 1.6x β 1.7x (tested v1.75+) Β· S3 Β· R2 Β· Google Drive Β· TorBox T3 Β· GoFile
Note
Check your build before you copy a flag.
rclone version shows the version Β· rclone help flags confirms a flag exists Β· rclone selfupdate updates the binary (not on package-manager installs).
| # | Section | Go here when you need to⦠|
|---|---|---|
| 1 | Golden rules | Avoid losing data on your first run |
| 2 | Paths & filtering | Understand where files land, include or exclude files |
| 3 | Configuration & remotes | Set up, protect or script a remote |
| 4 | Command reference | Look up what a command does and how risky it is |
| 5 | Tuning engine | Set concurrency, memory, compare mode, bandwidth, logging |
| 6 | Scenario profiles | Copy a ready-made command for a specific route |
| 7 | VFS mount recipes | Mount a remote as a filesystem |
| 8 | Automation | Run jobs from scripts, systemd services and timers |
| 9 | Verification & troubleshooting | Confirm a transfer or fix an error |
| 10 | Decision matrix | Pick starting flags in 10 seconds |
Risk legend used throughout: π’ Low Β· π‘ Medium Β· π΄ High (can delete data)
| Rule | How | |
|---|---|---|
| β | Test first | --dry-run, or -i for interactive prompts, before any sync, move or delete |
| β | Prefer copy over sync |
If you must sync, add --backup-dir on the same remote, outside the destination path |
| β | Know where the bytes flow | Client-side transfers pass every byte through the rclone machine, so run them on a VPS with a fast uplink |
| β | Respect the slowest limit | Usually a provider's rate limit or daily quota, not your bandwidth |
| β | Do the memory math | See Memory formula before raising --transfers, --s3-chunk-size or --s3-upload-concurrency |
| β | Log long jobs | --log-file, and run inside tmux, screen or systemd |
| β | Verify afterwards | rclone check β see section 9 |
Important
rclone copies the contents of the source directory, not the directory itself. A trailing slash on the source makes no difference.
# Source: /data/photos/a.jpg, /data/photos/b.jpg
rclone copy /data/photos s3:my-bucket/backup
# Result: s3:my-bucket/backup/a.jpg, s3:my-bucket/backup/b.jpg
# To keep the folder name, put it in the destination:
rclone copy /data/photos s3:my-bucket/backup/photos| Target | Syntax | Note |
|---|---|---|
| Local | /path/to/dir Β· C:\path\to\dir |
|
| Remote | remote:bucket/path |
On S3-type remotes the first segment is the bucket |
| Remote root | remote: |
|
| Single file, renamed | copyto / moveto |
Use when you want to name the destination file |
Applies to most commands.
| Flag | Effect |
|---|---|
--include "*.mkv" Β· --exclude "*.tmp" |
Pattern filters. Order matters β first match wins |
--filter-from rules.txt |
File of + include / - exclude rules |
--files-from list.txt |
Explicit list of relative paths |
--min-size 10M Β· --max-size 50G |
Size window |
--min-age 15m Β· --max-age 30d |
Age window. --min-age skips files still being written |
--max-depth 2 |
Limit recursion |
| OS | Config location |
|---|---|
| Linux / macOS | ~/.config/rclone/rclone.conf |
| Windows | %APPDATA%\rclone\rclone.conf |
| Any | rclone config file prints the exact path |
| Command | Does |
|---|---|
rclone config |
Interactive wizard |
rclone listremotes |
List configured remotes |
rclone config show |
INI output. Passwords obscured, not redacted |
rclone config redacted |
β Safe to paste into forum posts or support tickets |
rclone config dump |
JSON output |
rclone config create NAME TYPE key=value ... |
Non-interactive creation |
rclone obscure "password" |
Obscure a password for the config file |
Caution
Your keys sit in rclone.conf in cleartext or obscured form. Obscured is not encrypted.
rclone config encryption set # password-protect rclone.conf
export RCLONE_CONFIG_PASS='...' # unattended runs (or use --password-command)
chmod 600 ~/.config/rclone/rclone.confAny flag becomes RCLONE_ + flag name, uppercase, hyphens β underscores:
export RCLONE_TRANSFERS=16
export RCLONE_CHECKERS=32Tip
You can define a whole remote with no config file β handy in CI:
export RCLONE_CONFIG_MYS3_TYPE=s3
export RCLONE_CONFIG_MYS3_PROVIDER=AWS
export RCLONE_CONFIG_MYS3_ENV_AUTH=true
rclone lsd mys3:| Cloudflare R2 | TorBox T3 (read-only) |
|---|---|
[r2]
type = s3
provider = Cloudflare
access_key_id = ...
secret_access_key = ...
endpoint = https://<ACCOUNT_ID>.r2.cloudflarestorage.com
acl = private
# needed if the token can't create buckets
no_check_bucket = true |
[torbox]
type = s3
provider = Other
access_key_id = <TorBox Auth ID>
secret_access_key = <TorBox API key>
endpoint = https://t3.nexus
force_path_style = true
no_check_bucket = true
# TorBox requires v2 signatures; "Other"
# defaults to v2. To force: v2_auth = true |
| GoFile (Native in 1.7x) | Google Drive (Custom OAuth) |
[gofile]
type = gofile
access_token = <GoFile API token>
# Optional: lock remote to a specific folder:
# root_folder_id = <folder_id> |
[gdrive]
type = drive
client_id = <ID>.apps.googleusercontent.com
client_secret = <SECRET>
scope = drive
# token generated via: rclone config reconnect gdrive: |
| Command | Behavior | Risk |
|---|---|---|
copy src dst |
Copies new/changed files. Never deletes on dst. The default choice | π’ |
sync src dst |
Makes dst identical to src. Deletes extra files on dst | π΄ |
move src dst |
Copies, then deletes from source. Fails on read-only sources | π‘ |
copyto / moveto |
As above, but dst is an explicit file or folder name | π’ / π‘ |
copyurl url dst |
Downloads an HTTP(S) URL straight into a remote | π’ |
bisync a b |
Two-way sync with state tracking. First run needs --resync |
π΄ |
Warning
Run sync, move and bisync with --dry-run first. Every π΄ command can remove files you meant to keep.
| Command | Output |
|---|---|
ls |
Recursive Β· size + path |
lsl |
Recursive Β· size + modtime + path |
lsd |
Directories/buckets, one level |
lsf |
Machine-friendly. --format "pst" = path, size, time; add h and --hash md5 for hashes |
lsjson |
Structured JSON (add --hash, --fast-list, -R) |
tree |
ASCII tree |
size |
Object count + total bytes (--json available) |
about remote: |
Quota / used / free, where supported |
ncdu remote: |
Interactive disk-usage browser. There is no du command |
| Command | Purpose |
|---|---|
check src dst |
Compares size and hash. Flags: --size-only, --download, --one-way, --combined FILE |
cryptcheck plain crypt: |
Checks unencrypted data against a crypt remote |
md5sum Β· sha1sum Β· hashsum TYPE |
Outputs checksums. --download computes locally if the backend has none |
| Command | Operation | Risk |
|---|---|---|
delete |
Deletes files matching filters; keeps directories | π΄ |
deletefile |
Deletes one file | π‘ |
rmdir / rmdirs |
Removes empty dirs. rmdirs --leave-root keeps the top folder |
π’ |
purge |
Irrevocably removes a path and everything under it | π΄ |
cleanup |
Empties Drive trash, or removes stale incomplete S3 multipart uploads | π‘ |
| Command | Description |
|---|---|
mount remote:path /mnt/x |
FUSE mount with VFS caching β see section 7 |
nfsmount |
Mount via a built-in NFS server where FUSE isn't available |
serve http|webdav|sftp|ftp|s3|dlna|nfs|restic |
Expose a remote over a protocol |
| Command | Use |
|---|---|
cat / rcat |
Stream to stdout / from stdin, e.g. tar cf - . | rclone rcat s3:b/t.tar |
dedupe |
Fix duplicate names (Drive, OneDrive) |
settier |
Change storage tier (Glacier, Archive, etc.) |
backend CMD remote: |
Provider-specific commands (e.g. S3 restore) |
selfupdate |
Update the binary |
| Flag | Controls | Default |
|---|---|---|
--checkers N |
Threads comparing source vs destination | 8 |
--transfers N |
Whole files in flight at once | 4 |
--buffer-size SIZE |
In-memory read buffer per transfer | 16Mi |
--max-buffer-memory SIZE |
Hard global ceiling on total buffer memory allocated across all transfers | off |
--s3-upload-concurrency N |
Parts of one file uploaded in parallel | 4 |
--s3-chunk-size SIZE |
Size of each part | 5Mi |
--multi-thread-streams N |
Parallel streams for one file when writing to local disk. Only for files above --multi-thread-cutoff (default 256Mi) |
4 |
--multi-thread-chunk-size SIZE |
Chunk size per stream in multi-thread download | 64Mi |
Warning
Connections multiply: total β transfers Γ s3-upload-concurrency.
Providers with connection caps β debrid services, GoFile, Drive β punish this.
S3 allows at most 10,000 parts per object.
- Known-size files: rclone raises the chunk size automatically.
- Streamed uploads (
rcat) of unknown size: the default5Michunk caps you at β 48 GiB. Set--s3-chunk-sizeexplicitly.
Peak RAM β transfers Γ (s3-chunk-size Γ s3-upload-concurrency + buffer-size)
+ checkers Γ ~1 MB
+ listing memory
Worked example
--transfers |
--s3-chunk-size |
--s3-upload-concurrency |
--buffer-size |
Peak RAM |
|---|---|---|---|---|
| 16 | 64M | 8 | 32M | 16 Γ (512 + 32) MB β 8.7 GB |
Safety valves, in order of impact
- Lower
--s3-upload-concurrencyfirst β it multiplies memory fastest. - Set
--max-buffer-memory 4Gβ caps the global buffer allocation, preventing out-of-memory crashes on systems with constrained RAM. - Add
--use-mmapβ instructs the Go memory allocator to release freed buffer memory back to the operating system sooner.
How rclone decides a file is already up to date.
| Mode | Flag | Speed | Notes |
|---|---|---|---|
| Size + modtime | (default) | βββ | On S3 sources can cost a HEAD request per object |
| Size only | --size-only |
βββ | Misses same-size edits. Best when hashes are incomparable (e.g. TorBox β R2) |
| Size + hash | --checksum |
βββ | Needs a hash both sides share; reads every local file |
| Skip if present | --ignore-existing |
βββ | Fastest for append-only archives |
| Newer only | --update |
βββ | Add --use-server-modtime to avoid HEADs on S3 |
| Flag | Effect | Use when / caution |
|---|---|---|
--fast-list |
Recursive listing in few API calls | Big trees on S3/B2/Drive. --no-traverse |
--no-traverse |
Skips listing the destination; checks files individually | Few files going into a huge destination |
--tpslimit N Β· --tpslimit-burst N |
Caps API calls per second | Drive, OneDrive, GoFile, anything returning 429s |
--max-backlog N |
Checker β transfer queue (default 10000) |
Raise on huge trees |
--check-first |
Finishes all checks before transferring | Accurate totals; slower start |
--order-by size,mixed,75 |
Transfer ordering | Mixed sets keep slots busy. size,descending = big files first |
| Flag | Effect |
|---|---|
--bwlimit 20M |
Flat cap in bytes/s (20Mi for MiB) |
--bwlimit "08:00,2M 23:00,off" |
Schedule: slow by day, full speed at night |
--max-transfer 700G --cutoff-mode soft |
Stop starting new files at a byte budget |
--max-duration 6h |
Stop after a time budget |
In modern rclone (1.7x), report flags are fully supported on copy and sync as well as check, providing a full audit trail without requiring a secondary inspection pass:
# Generate per-file outcome logs during live transfers:
rclone copy src: dst: \
--combined combined.txt \
--differ differ.txt \
--missing-on-dst missing-dst.txt \
--missing-on-src missing-src.txt \
--match matched.txt \
--error errors.txt| Flag | Report contents |
|---|---|
--combined FILE |
All evaluated files prefixed with status symbols below (- outputs to stdout) |
--differ FILE |
Paths present on both sides but differing in size, modtime or hash |
--missing-on-dst FILE |
Paths present on source but missing on destination |
--missing-on-src FILE |
Paths present on destination but missing on source |
--match FILE |
Paths identical on both source and destination |
--error FILE |
Paths that encountered read, hash, or transfer failures |
--combined line prefixes
| Prefix | Meaning |
|---|---|
= |
Identical (matches on source and destination) |
+ |
Only on source (missing on destination) |
- |
Only on destination (missing on source) |
* |
On both, but differs |
! |
Error reading or hashing |
| Flag | Level / effect |
|---|---|
-v |
INFO β one line per file |
-vv |
DEBUG β every API call. Send to --log-file |
--log-file x.log |
Write log to file |
--stats 30s --stats-one-line |
Compact progress every 30 s |
--dump headers |
HTTP headers. |
| Code | Meaning | Code | Meaning |
|---|---|---|---|
0 |
Success | 6 |
Less serious error |
1 |
Uncategorized error | 7 |
Fatal error |
2 |
Usage error | 8 |
--max-transfer reached |
3 |
Directory not found | 9 |
Nothing transferred (with --error-on-no-transfer) |
4 |
File not found | 10 |
--max-duration reached |
5 |
Temporary error |
Each profile lists the data path, the real bottleneck, peak RAM, and a starting command. Tune from there.
| Profile | Route | Data path |
|---|---|---|
| 6.1 | S3 β S3, same account | π₯οΈ Server-side |
| 6.2 | S3 β S3, cross-provider | π» Client-side |
| 6.3 | S3 β Google Drive | π» Client-side |
| 6.4 | Google Drive β S3 | π» Client-side |
| 6.5 | Local HDD β S3 | π» Client-side |
| 6.6 | Drive β Drive | π₯οΈ Server-side |
| 6.7 | NVMe / 10GbE β S3 | π» Client-side |
| 6.8 | TorBox T3 β R2 / Drive / GoFile | π» Client-side |
| Data path | Bottleneck | Peak RAM |
|---|---|---|
π₯οΈ Server-side (CopyObject / UploadPartCopy) |
Provider request rate | Negligible |
Applies to AWS S3, and to R2 within one account. Not across providers.
rclone copy aws:source-bucket aws:dest-bucket \
--transfers 64 --checkers 64 \
--fast-list --s3-no-check-bucket \
--log-file s3_server_copy.log --log-level INFO -P- Scale: start at 64; raise toward 128 only while the log stays clean.
- Cross-account: credentials need read on the source and write on the destination.
| Data path | Bottleneck | Peak RAM |
|---|---|---|
| π» Client-side | Your uplink + RAM | β 16 Γ (256 + 32) MB β 4.6 GB |
rclone copy s3-aws:src-bucket r2:dst-bucket \
--transfers 16 --checkers 32 \
--fast-list \
--s3-chunk-size 64M --s3-upload-concurrency 4 \
--buffer-size 32M --max-buffer-memory 4G --use-mmap \
--s3-no-check-bucket \
--retries 5 --low-level-retries 10 \
--stats 10s --stats-one-line -P- Safety ceiling:
--max-buffer-memory 4Gprevents out-of-memory crashes if concurrency surges. - Scale: raise
--s3-upload-concurrencyto 8 only with RAM to spare. - Hashes differ across providers? Add
--size-only. - Stream resets / "connection reset"? Add
--s3-disable-http2β a workaround for a specific provider, not a default.
Important
Every Drive route (6.3, 6.4, 6.6, 6.8) is bound by these:
- β 750 GB/day of uploads per account.
- A few new files per second.
- The shared default rclone OAuth client is heavily throttled β create your own Client ID and Secret in Google Cloud Console.
| Data path | Bottleneck | Peak RAM (chunks) |
|---|---|---|
| π» Client-side | Drive API rate + daily cap | transfers Γ drive-chunk-size = 512 MB |
rclone copy s3:prod-backups gdrive:ArchivedBackups \
--transfers 4 --checkers 8 \
--tpslimit 8 --tpslimit-burst 2 \
--drive-chunk-size 128M --drive-upload-cutoff 128M \
--drive-stop-on-upload-limit \
--max-transfer 700G --cutoff-mode soft \
--buffer-size 64M --fast-list \
--log-file s3_to_gdrive.log --log-level NOTICE -P- Why 700G, not 750G: soft cutoff lets in-flight files finish, so it can overshoot by a few large files. 700G leaves margin.
| Data path | Bottleneck | Peak RAM |
|---|---|---|
| π» Client-side | Drive API rate | β 8 Γ (256 + 32) MB β 2.3 GB |
rclone copy gdrive:CompanyFiles s3:cold-archive/gdrive \
--transfers 8 --checkers 16 \
--tpslimit 10 \
--s3-chunk-size 64M --s3-upload-concurrency 4 \
--buffer-size 32M --fast-list \
--drive-export-formats docx,xlsx,pptx \
--log-file gdrive_to_s3.log -P- Google Docs/Sheets/Slides:
--drive-export-formatsconverts them;--drive-skip-gdocsskips them. Pick one β skipping makes export formats moot. cannotDownloadAbusiveFileon files you own: add--drive-acknowledge-abuse.
rclone copy SRC DST --max-transfer 700G --cutoff-mode soft --drive-stop-on-upload-limit ...
rc=$?
[ $rc -eq 8 ] && echo "Daily cap reached, will resume tomorrow" && exit 0
exit $rcExit code 8 = --max-transfer reached, treated as success so the scheduler retries tomorrow.
| Data path | Bottleneck | Peak RAM |
|---|---|---|
| π» Client-side | Disk seeks β spinning disks slow down when reads compete | β 2 Γ (256 + 64) MB β 0.6 GB |
rclone sync /mnt/storage_hdd/media s3:my-cold-bucket/media \
--transfers 2 --checkers 4 \
--s3-chunk-size 64M --s3-upload-concurrency 4 \
--buffer-size 64M --use-mmap \
--size-only \
--s3-storage-class STANDARD_IA \
--backup-dir s3:my-cold-bucket/deleted-$(date +%F) \
--log-file hdd_sync.log --log-level INFO -P--transfers 2keeps reads mostly sequential. On a slow uplink raise to 3β4 β the network may be the real limit.--size-onlyavoids hashing whole disks. For bit-rot protection use--checksum(slower).--backup-dirmust be on the same remote and outside the destination path.
Warning
STANDARD_IA bills a 30-day minimum and a 128 KB minimum object size. Don't use it for many tiny or short-lived files.
| Data path | Bottleneck | Peak RAM |
|---|---|---|
| π₯οΈ Server-side | Drive daily cap (still applies server-side) | Negligible |
rclone copy drive-src:Folder drive-dst:Folder \
--drive-server-side-across-configs \
--transfers 8 --checkers 16 \
--tpslimit 8 --fast-list \
--max-transfer 700G --cutoff-mode soft \
-v -P- Access: the destination account must be able to read the source, or both sit in the same Shared Drive.
| Data path | Bottleneck | Peak RAM |
|---|---|---|
| π» Client-side | RAM | 32 Γ (1024 + 64) MB β 35 GB |
rclone copy /mnt/nvme/datasets s3:big-data-bucket/datasets \
--transfers 32 --checkers 64 \
--s3-chunk-size 128M --s3-upload-concurrency 8 \
--buffer-size 64M --use-mmap \
--fast-list --s3-no-check-bucket \
--log-level NOTICE -P- Too much RAM? Lower
--s3-upload-concurrencyto 4 (β 18 GB), or cap with--max-buffer-memory.
Caution
Don't combine --fast-list with --no-traverse β they conflict. Use --fast-list for a big mirror; --no-traverse only for a few files going into a huge bucket.
T3 is TorBox's read-only S3-compatible service at https://t3.nexus. Access Key = TorBox Auth ID Β· Secret = API key Β· v2 signatures. Remote config: section 3.
| T3 behavior | What to do |
|---|---|
Buckets are tags. torbox holds untagged files; each tag is its own bucket |
List them with rclone lsd torbox: |
| Listings refresh every 15 min, can't be forced | Missing a new file? Rerun later |
| Cloudflare caching can serve stale listings | Inconsistent listings? Skip --fast-list on the first pass |
| Read-only | Use copy. move fails (can't delete source); sync toward T3 is pointless |
| Client-side | Run it on a VPS |
| Peak RAM | Compare | Verify |
|---|---|---|
| 8 Γ (256 + 32) MB β 2.3 GB | --size-only (T3 ETags won't match R2 hashes) |
rclone check torbox:torbox/2017 r2:misc --size-only --one-way |
rclone copy torbox:torbox/2017/ r2:misc \
--transfers 8 --checkers 16 \
--s3-chunk-size 64M --s3-upload-concurrency 4 \
--buffer-size 32M \
--size-only \
--retries 5 --low-level-retries 20 --retries-sleep 10s \
--stats 10s --stats-one-line \
--log-file t3_r2.log --log-level NOTICE -P- Scale: TorBox has no published connection limits. Start at 8; on 429s or resets drop to 4 and add
--tpslimit 10.
rclone copy torbox:torbox/path gdrive:TorBox \
--transfers 4 --checkers 8 \
--tpslimit 8 --tpslimit-burst 2 \
--drive-chunk-size 128M --drive-upload-cutoff 128M \
--drive-stop-on-upload-limit \
--max-transfer 700G --cutoff-mode soft \
--buffer-size 64M --size-only \
--retries 5 --low-level-retries 20 \
--log-file t3_gdrive.log --log-level NOTICE -P- Use your own OAuth client (Drive limits).
- Lots of small files? Drop to 2β3 transfers.
Modern rclone (1.7x) provides a native, first-class gofile backend. Setup in rclone.conf:
[gofile]
type = gofile
access_token = YOUR_API_TOKEN
# Optional: restrict to a specific directory ID
# root_folder_id = <folder_id>rclone copy torbox:torbox/path gofile:folder \
--transfers 2 --checkers 4 --tpslimit 2 \
--buffer-size 32M --size-only \
--retries 8 --low-level-retries 20 --retries-sleep 15s \
--log-file t3_gofile.log --log-level NOTICE -P- Backend options:
list_chunkdefaults to 1000 items per call. - Rate limiting: GoFile enforces strict concurrent upload throttling. Keep
--transfers 2and--tpslimit 2to avoid HTTP 429 timeouts.
Large files can download in parallel with --multi-thread-streams 8.
Note
Linux prerequisites: install FUSE. For --allow-other, uncomment user_allow_other in /etc/fuse.conf.
| Mode | Caches | Use for |
|---|---|---|
off |
Nothing β pure streaming | Simple reads. Writes and random seeks often fail |
minimal |
Only files opened for both reading and writing | Rarely the right choice |
writes |
Files opened for writing | Uploads, light disk use |
full |
Reads and writes, in blocks | Apps that seek or read/write. Most compatible; uses local disk |
A read-only streaming mount can run with less than full.
rclone mount gdrive:Media /mnt/media \
--allow-other --read-only \
--dir-cache-time 72h --poll-interval 15s \
--vfs-cache-mode full \
--vfs-cache-max-size 50G --vfs-cache-max-age 24h \
--vfs-cache-min-free-space 10G \
--vfs-read-ahead 128M \
--vfs-read-chunk-size 32M --vfs-read-chunk-size-limit 2G \
--buffer-size 64M \
--vfs-refresh --vfs-fast-fingerprint \
--log-level INFO --log-file /var/log/rclone_plex.log--vfs-refresh: Pre-warms the entire directory hierarchy in the background upon startup, eliminating initial navigation freezes in Plex/Jellyfin.--vfs-fast-fingerprint: Accelerates cache validation by bypassing redundant file hashing.--poll-interval: Only applies to backends with server change notifications (Google Drive yes, S3 no).
Warning
In Plex, disable "Scan my library automatically" and deep media analysis. Mass scanning against Drive is a common cause of API bans.
rclone mount s3:company-assets /mnt/assets \
--allow-other \
--vfs-cache-mode full \
--vfs-cache-max-size 100G --vfs-cache-max-age 48h \
--vfs-cache-min-free-space 15G \
--vfs-write-back 5s \
--dir-cache-time 10m --attr-timeout 10m \
--vfs-read-chunk-streams 4 --vfs-read-chunk-size 16M \
--no-modtime \
--write-back-cache \
--vfs-refresh \
--buffer-size 32M--vfs-read-chunk-streams 4: Reads 4 chunks concurrently, maximizing throughput on high-latency cloud connections.--no-modtime: Slashes S3 API costs and latency by eliminating extraHEADtransactions for object timestamps.--write-back-cache: Enables OS kernel write buffering (Linux/macOS) for smoother interactive editing.
| Flag | Purpose | Recommended setting |
|---|---|---|
--vfs-refresh |
Recursively refreshes directory cache in the background on mount startup | Add to all long-lived mounts |
--vfs-fast-fingerprint |
Uses size and modtime to validate cached files without hashing | Standard with --vfs-cache-mode full |
--vfs-read-chunk-streams N |
Concurrently downloads N fixed-size chunks (when > 0) | 4β16 on S3, R2, or high-latency WAN links |
--vfs-cache-min-free-space SIZE |
Hard floor on host drive free space; evicts cached files before disk fills | 10Gβ20G |
--no-modtime Β· --use-server-modtime |
Avoids expensive S3 metadata requests per object | Use on S3/Swift mounts to cut API bills |
--write-back-cache |
Enables kernel writeback cache on Linux/macOS | Interactive file shares / desktop mounts |
sync_job.sh β locked against overlapping runs, backs up deletions, verifies, then cleans up.
#!/usr/bin/env bash
set -Eeuo pipefail
LOCK_FILE="${XDG_RUNTIME_DIR:-/tmp}/rclone_backup.lock" # /var/run needs root
LOG_DIR="/var/log/rclone"
DATE=$(date +%F_%H-%M-%S)
LOG_FILE="${LOG_DIR}/sync_${DATE}.log"
SOURCE_PATH="/mnt/data/critical"
DEST_PATH="s3:corporate-backup-vault/critical"
BACKUP_DIR="s3:corporate-backup-vault/archive_${DATE}"
mkdir -p "${LOG_DIR}"
exec 200>"${LOCK_FILE}"
flock -n 200 || { echo "Another run is active. Exiting."; exit 1; }
trap 'echo "[$(date +%T)] FAILED at line $LINENO" | tee -a "${LOG_FILE}"' ERR
echo "[${DATE}] Starting sync..." | tee -a "${LOG_FILE}"
rclone sync "${SOURCE_PATH}" "${DEST_PATH}" \
--backup-dir "${BACKUP_DIR}" \
--transfers 8 --checkers 16 --fast-list --use-mmap \
--s3-chunk-size 64M --s3-upload-concurrency 4 --buffer-size 32M \
--max-buffer-memory 2G --s3-no-check-bucket \
--combined "${LOG_DIR}/combined_${DATE}.txt" \
--retries 3 --low-level-retries 10 \
--stats 30s --stats-one-line \
--log-file "${LOG_FILE}" --log-level INFO
echo "[$(date +%T)] Sync done. Verifying..." | tee -a "${LOG_FILE}"
# Local -> S3: rclone stores an MD5 as object metadata on upload, so a hash check
# usually works. Use --size-only for a quicker pass, or --download as a last resort.
rclone check "${SOURCE_PATH}" "${DEST_PATH}" --one-way \
--log-file "${LOG_FILE}" --log-level NOTICE
# Remove stale incomplete multipart uploads (S3)
rclone cleanup "${DEST_PATH}"
echo "[$(date +%T)] Finished successfully." | tee -a "${LOG_FILE}"Tip
Ping a healthcheck URL (Healthchecks.io, Uptime Kuma) on success β curl -fsS https://.../ping β so silent failures get noticed.
/etc/systemd/system/rclone-mount.service
[Unit]
Description=Rclone VFS Mount for S3 Assets
After=network-online.target
Wants=network-online.target
[Service]
Type=notify
User=ubuntu
Group=ubuntu
ExecStart=/usr/bin/rclone mount s3:company-assets /mnt/assets \
--config=/home/ubuntu/.config/rclone/rclone.conf \
--allow-other \
--vfs-cache-mode full --vfs-cache-max-size 50G --vfs-cache-min-free-space 10G \
--vfs-refresh --vfs-fast-fingerprint \
--dir-cache-time 30m \
--log-level INFO --log-file=/var/log/rclone-mount.log
ExecStop=/bin/fusermount3 -uz /mnt/assets
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.targetOn older systems use fusermount instead of fusermount3.
/etc/systemd/system/rclone-sync.service | /etc/systemd/system/rclone-sync.timer |
|---|---|
[Unit]
Description=Rclone backup sync
[Service]
Type=oneshot
User=ubuntu
ExecStart=/usr/local/bin/sync_job.sh |
[Unit]
Description=Nightly rclone sync
[Timer]
OnCalendar=*-*-* 02:30:00
Persistent=true
RandomizedDelaySec=10m
[Install]
WantedBy=timers.target |
Enable both:
sudo systemctl daemon-reload
sudo systemctl enable --now rclone-mount.service rclone-sync.timer
systemctl list-timers | grep rclone| Command | Checks | Speed |
|---|---|---|
rclone check SRC DST --one-way |
Size + hash, if available | βββ |
rclone check SRC DST --size-only --one-way |
Size only β when hashes aren't comparable | βββ |
rclone check SRC DST --download --one-way |
Reads both sides. Definitive | βββ |
rclone check SRC DST --combined report.txt |
Full per-file report (prefixes) | βββ |
rclone check SRC DST --match matched.txt --differ diffs.txt |
Separates matching and differing paths into clean lists | βββ |
rclone copy SRC DST --combined audit.txt |
In-flight audit log directly generated during transfer pass | βββ |
| Symptom | Likely cause β fix |
|---|---|
SignatureDoesNotMatch / 403 on custom S3 |
Wrong signature version or endpoint, missing force_path_style, or clock skew β sync with NTP |
429, SlowDown, 503 |
Too aggressive β lower --transfers, add --tpslimit |
userRateLimitExceeded (Drive) |
Shared OAuth client β use your own, lower --tpslimit |
| Upload limit / quota 403 (Drive) | 750 GB/day reached β --drive-stop-on-upload-limit, resume tomorrow |
| Out of memory | β Re-run the memory formula; lower concurrency, chunk size or transfers |
too many parts / EntityTooLarge |
Chunk size too small β raise --s3-chunk-size |
Empty listing / exit 3 |
Wrong bucket or path β check with rclone lsd remote: |
| Files re-copied every run | Hashes/modtimes don't match across providers β --size-only |
corrupted on transfer: hashes differ |
Provider hash mismatch β retry; --ignore-checksum only as last resort, then verify |
| Duplicate names on Drive | β rclone dedupe |
| Stale T3 listings | 15-min refresh + Cloudflare cache β wait and rerun |
| Job died on SSH drop | β run in tmux, screen or systemd |
Important
rclone does not resume partial uploads. An interrupted large file restarts from zero on the next run; already-completed files are skipped.
| If you're doing⦠| Path | Starting flags | Profile |
|---|---|---|---|
| S3 β S3, same provider & account | π₯οΈ Server | --transfers 64 --checkers 64 --fast-list --s3-no-check-bucket |
6.1 |
| S3 β S3, cross-provider (e.g. AWS β R2) | π» Client β do the RAM math | --transfers 16 --s3-chunk-size 64M --s3-upload-concurrency 4 --max-buffer-memory 4G, + --size-only if hashes differ |
6.2 |
| TorBox T3 β R2 | π» Read-only source, copy only |
--transfers 8 --size-only |
6.8 |
| TorBox T3 β Drive | π» Read-only source, copy only |
--transfers 4 --tpslimit 8 --size-only |
6.8 |
| TorBox T3 β GoFile | π» Read-only source, copy only |
--transfers 2 --tpslimit 2 --size-only |
6.8 |
| Anything β Google Drive | π» Guard API rate + daily cap | --transfers 4 --tpslimit 8 --drive-chunk-size 128M --max-transfer 700G --drive-stop-on-upload-limit |
6.3 |
| Mechanical HDD β cloud | π» Avoid seek thrashing | --transfers 2 --checkers 4 --size-only --buffer-size 64M |
6.5 |
| NVMe / 10GbE β cloud | π» Big chunks, budget RAM | --transfers 32 --checkers 64 --s3-chunk-size 128M --s3-upload-concurrency 8 --max-buffer-memory 8G |
6.7 |
Using sync instead of copy |
π΄ --dry-run first |
--backup-dir remote:bucket/deleted-$(date +%F)/ |
Rules |
| Mounting a remote (General) | VFS | --vfs-cache-mode full --vfs-cache-max-size 50G --vfs-cache-min-free-space 10G --vfs-refresh --vfs-fast-fingerprint |
7 |
| Mounting S3 / R2 (High Latency) | VFS | --vfs-cache-mode full --vfs-read-chunk-streams 4 --no-modtime --write-back-cache |
7 |
-
--combinedfamily oncopy/sync: Fully accepted oncopy,sync, andcheck(--combined,--differ,--error,--missing-on-dst,--missing-on-src,--match). - Native GoFile backend options:
type = gofile,access_token,root_folder_id,account_id,list_chunk(default 1000). -
--max-buffer-memory: Fully supported global buffer cap (--max-buffer-memory SIZE, defaultoff) to prevent RAM exhaustion across concurrent transfers. - Modern VFS mount enhancements:
--vfs-refresh(background priming on mount),--vfs-fast-fingerprint(fast cache validation),--vfs-read-chunk-streams(concurrent chunk streaming for S3/WAN),--write-back-cache(kernel write buffer on Linux/macOS).
Changelog
V2.1 Updates (rclone 1.7x / v1.75+ settings):
- Verified and documented
--combined,--differ,--missing-on-dst,--missing-on-src,--match, and--errorduring livecopyandsyncpasses. - Added
--max-buffer-memoryto tuning profiles and memory formulas to prevent out-of-memory spikes. - Expanded VFS recipes with
--vfs-refresh,--vfs-fast-fingerprint,--vfs-read-chunk-streams,--no-modtime, and--write-back-cache. - Added verified native
gofileand custom OAuthgdrivebackend configurations. - Upgraded
sync_job.shandrclone-mount.servicewith modern buffer caps, cache safety floors, and live audit logging.
V2.0 Overhauls (Fixed from V1):
Wrong or misleading statements fixed
| Topic | Correction |
|---|---|
config show / config dump |
dump is JSON; config redacted is the share-safe one |
rclone du |
Doesn't exist β it's ncdu |
rclone check --checksum |
Not how check works |
| Multi-thread cutoff | Default is 256Mi, not 250Mi |
--use-mmap |
About releasing memory back to the OS, not paging |
--vfs-cache-mode minimal |
Was described wrongly |
--multi-thread-streams |
Mostly for downloads to local disk |
Contradictory flag combos fixed
--fast-listwith--no-traverse--drive-skip-gdocswith--drive-export-formats
Overstatements softened: "always use --fast-list" and "always use --vfs-cache-mode full".
Script fixes: the "checksum validation" step actually used --size-only; the lock file path needed root.
Added: compare-mode guidance, filtering and ordering, bandwidth schedules, exit codes, a quota-aware Drive loop, a systemd timer, a troubleshooting table, security notes, and the TorBox T3 scenario.