rclone --max-size
Max-size is a practical control for keeping very large objects out of latency-sensitive or cost-constrained jobs. This guide explains threshold planning so you can split workflows by object size and keep transfer windows predictable.
Syntax
rclone copy SRC DST --max-size 5G
Size Pattern Format
Rclone size values use binary units (KiB-based):
| Unit | Suffix | Bytes |
|---|---|---|
| Byte | b | 1 |
| Kibibyte | k or K | 1024 |
| Mebibyte | m or M | 1024^2 |
| Gibibyte | g or G | 1024^3 |
| Tebibyte | t or T | 1024^4 |
| Pebibyte | p or P | 1024^5 |
Common patterns:
| Intent | Value |
|---|---|
| Keep only small files | 50M |
| API/cost-controlled transfer | 250M |
| Exclude very large media | 1G |
Boundary behavior:
--max-size 5Gmeans files must be at most 5 GiB.- Use
--dry-run -vvto verify inclusion/exclusion around your cutoff.
Examples with Output
1. Keep files under 100M
Input command:
rclone copy /srv/data remote:backup/data --max-size 100M --dry-run
Expected output:
NOTICE: max-size filter 100M applied
Would transfer 126 files
2. Exclude huge video files
Input command:
rclone sync /srv/media remote:backup/media --max-size 1G --dry-run
Expected output:
NOTICE: files larger than 1G skipped
Would transfer 83 files
3. Cost-limited object sync
Input command:
rclone copy /srv/object remote:backup/object --max-size 250M --dry-run
Expected output:
NOTICE: cost-control threshold 250M active
Would transfer 59 files
4. Keep small logs only
Input command:
rclone copy /var/log remote:backup/log --max-size 20M --dry-run
Expected output:
NOTICE: large log bundles skipped
Would transfer 48 files
5. Max-size + max-age for hot data
Input command:
rclone copy /srv/uploads remote:hot/uploads --max-size 200M --max-age 3d --dry-run
Expected output:
NOTICE: hot-data size/time window applied
Would transfer 33 files
6. Docs sync below 50M
Input command:
rclone sync /srv/docs remote:backup/docs --max-size 50M --dry-run
Expected output:
NOTICE: docs under 50M selected
Would copy 71 files, delete 0 files
7. With include file type
Input command:
rclone copy /srv/site remote:backup/site --max-size 80M --include "**/*.zip" --dry-run
Expected output:
NOTICE: zip files under 80M selected
Would transfer 12 files
8. With checksum mode
Input command:
rclone copy /srv/releases remote:backup/releases --max-size 300M --checksum --dry-run
Expected output:
NOTICE: checksum mode enabled
Would transfer 8 changed files
9. With bandwidth limit
Input command:
rclone copy /srv/data remote:backup/data --max-size 150M --bwlimit 10M --dry-run
Expected output:
NOTICE: bwlimit=10M, max-size=150M
Would transfer 62 files
10. With transfer tuning
Input command:
rclone copy /srv/data remote:backup/data --max-size 500M --transfers 4 --checkers 8 --dry-run
Expected output:
NOTICE: checkers=8 transfers=4
Would transfer 91 files
11. Upload subset for quick restore tier
Input command:
rclone copy /srv/backups remote:quick-restore/backups --max-size 2G --dry-run
Expected output:
NOTICE: quick-restore size cap 2G
Would transfer 26 files
12. Combine min-age and max-size
Input command:
rclone copy /srv/logs remote:archive/logs --min-age 3d --max-size 100M --dry-run
Expected output:
NOTICE: old logs under 100M selected
Would transfer 57 files
13. Verbose rule validation
Input command:
rclone copy /srv/media remote:backup/media --max-size 700M --dry-run -vv
Expected output:
DEBUG: Excluded (too large): movie-raw-4k.mkv
INFO : 1 size filter rule active
14. Safe sync before production
Input command:
rclone sync /srv/data remote:backup/data --max-size 250M --dry-run -vv
Expected output:
NOTICE: dry-run enabled, no writes performed
Would transfer 68 files
15. Multi-rule controlled transfer
Input command:
rclone copy /srv/app remote:backup/app --max-size 120M --exclude "**/*.tmp" --max-age 7d --dry-run
Expected output:
NOTICE: size, age, and exclude rules applied
Would transfer 37 files