Filtering and Selection Cheatsheet
Folder Mapping
04-filtering-and-selection/
├── include-exclude-patterns/
│ ├── exclude/
│ ├── include/
│ ├── exclude-from/
│ ├── include-from/
│ └── filter/
├── age-size-and-time-filters/
│ ├── age/
│ ├── size/
│ └── time/
└── files-from-and-advanced-selection/
Core Flag Matrix
| Area | Flag | Use it for |
|---|---|---|
| Include/Exclude | --exclude | Omit matching files/dirs |
| Include/Exclude | --include | Allow-list matching files |
| Include/Exclude | --exclude-from | Load exclude rules from file |
| Include/Exclude | --include-from | Load include rules from file |
| Include/Exclude | --filter / --filter-from | Ordered allow/deny rules |
| Age/Time | --min-age | Older-than window |
| Age/Time | --max-age | Newer-than window |
| Size | --min-size | Skip tiny files |
| Size | --max-size | Skip very large files |
| Deterministic lists | --files-from | Transfer exact listed paths |
Age and Size Patterns
| Type | Supported suffixes | Example |
|---|---|---|
| Age | ms, s, m, h, d, w, M, y | --max-age 7d |
| Size | b, k/K, m/M, g/G, t/T, p/P | --min-size 100M |
Age format caveat
Rclone rejects mixed age tokens like 3w3d. Use one equivalent value such as 24d or 576h.
Fast Safe Patterns
# include only docs
rclone copy /srv/docs remote:backup/docs --include "**/*.md" --include "**/*.mdx" --dry-run -vv
# exclude noisy folders
rclone sync /srv/app remote:backup/app --exclude "**/node_modules/**" --exclude "**/*.log" --dry-run -vv
# hot-window sync (last 72h)
rclone sync /srv/uploads remote:hot/uploads --max-age 72h --dry-run -vv
# cold archive (older + larger)
rclone copy /srv/media remote:cold/media --min-age 30d --min-size 500M --dry-run -vv
# deterministic transfer list
rclone copy /srv/data remote:exports --files-from /tmp/selected-files.txt --dry-run -vv
Preflight Checklist
- Confirm source root matches your filter/list assumptions.
- Run
--dry-run -vvwhenever rules change. - For complex rules, prefer
--*-fromfiles stored in version control. - For
sync, review planned deletes before live execution.