Skip to main content

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

AreaFlagUse it for
Include/Exclude--excludeOmit matching files/dirs
Include/Exclude--includeAllow-list matching files
Include/Exclude--exclude-fromLoad exclude rules from file
Include/Exclude--include-fromLoad include rules from file
Include/Exclude--filter / --filter-fromOrdered allow/deny rules
Age/Time--min-ageOlder-than window
Age/Time--max-ageNewer-than window
Size--min-sizeSkip tiny files
Size--max-sizeSkip very large files
Deterministic lists--files-fromTransfer exact listed paths

Age and Size Patterns

TypeSupported suffixesExample
Agems, s, m, h, d, w, M, y--max-age 7d
Sizeb, 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 -vv whenever rules change.
  • For complex rules, prefer --*-from files stored in version control.
  • For sync, review planned deletes before live execution.

Next