rclone --min-age
Min-age is designed for older-than selection windows, making it useful for archival offloads and delayed backup tiers. This guide explains exact duration behavior and practical combinations so you can move mature data without touching fresh, still-changing files.
Syntax
rclone copy SRC DST --min-age 24h
Age Pattern Format
Rclone age filters support these duration suffixes directly:
| Unit | Suffix | Example | Meaning |
|---|---|---|---|
| Millisecond | ms | 500ms | 0.5 seconds |
| Second | s | 45s | 45 seconds |
| Minute | m | 30m | 30 minutes |
| Hour | h | 6h | 6 hours |
| Day | d | 7d | 7 days |
| Week | w | 2w | 2 weeks |
| Month | M | 1M | 1 month |
| Year | y | 1y | 1 year |
Practical examples:
| Window | Value |
|---|---|
| Older than 24 hours | 24h |
| Older than 7 days | 7d |
| Older than 2 weeks | 2w |
| Older than 1 month | 1M |
| Older than 1 year | 1y |
Boundary behavior:
--min-age 24hmeans files must be older than 24 hours.mis minutes, whileMis months.- Usually pair with
--dry-run -vvto verify boundary matches before production.
Rclone rejects mixed tokens like 3w3d for age flags. Use a single equivalent duration such as 24d or 576h.
Min-Age Concept (Older Files)
In rclone, file age means how long ago a file was modified.
--min-age 90dselects files with age>= 90 days.- This means files older than 90 days.
- Use
--min-agewhen your goal is cleanup, retention delete, or cold archive moves.
Quick Comparison
| Flag | Meaning | Selects |
|---|---|---|
--max-age 90d | Age <= 90d | Newer/recent files |
--min-age 90d | Age >= 90d | Older files |
Delete Older Than 90 Days
If your goal is deleting files older than 90 days, use --min-age 90d.
# dry run first (recommended)
rclone delete remote:path --min-age 90d --dry-run
# actual delete
rclone delete remote:path --min-age 90d
Examples with Output
1. Older than 24 hours
Input command:
rclone copy /srv/uploads remote:archive/uploads --min-age 24h --dry-run
Expected output:
NOTICE: min-age filter 24h applied
Would transfer 138 files
2. Older than 7 days
Input command:
rclone sync /srv/logs remote:archive/logs --min-age 7d --dry-run
Expected output:
NOTICE: only files older than 7d selected
Would transfer 64 files
3. Cold media archive
Input command:
rclone copy /srv/media remote:cold/media --min-age 30d --dry-run
Expected output:
NOTICE: cold-tier selection enabled (30d)
Would transfer 412 files
4. Database dumps older than 3 days
Input command:
rclone copy /srv/db-dumps remote:archive/db --min-age 72h --dry-run
Expected output:
NOTICE: min-age 72h matched
Would transfer 22 files
5. Keep recent files out
Input command:
rclone copy /srv/app remote:backup/app --min-age 2d --exclude "**/*.tmp" --dry-run
Expected output:
NOTICE: min-age and exclude rules active
Would transfer 79 files
6. Weekly compliance archive
Input command:
rclone copy /srv/audit remote:archive/audit --min-age 14d --dry-run
Expected output:
NOTICE: selected records older than 14d
Would transfer 56 files
7. With checksum comparison
Input command:
rclone copy /srv/releases remote:archive/releases --min-age 5d --checksum --dry-run
Expected output:
NOTICE: checksum mode enabled
Would transfer 17 changed files
8. With bandwidth limit
Input command:
rclone copy /srv/videos remote:archive/videos --min-age 10d --bwlimit 12M --dry-run
Expected output:
NOTICE: bwlimit=12M, min-age=10d
Would transfer 93 files
9. With transfer parallelism
Input command:
rclone copy /srv/data remote:archive/data --min-age 48h --transfers 4 --checkers 8 --dry-run
Expected output:
NOTICE: checkers=8 transfers=4
Would transfer 141 files
10. Combine min-age and min-size
Input command:
rclone copy /srv/media remote:cold/media --min-age 30d --min-size 500M --dry-run
Expected output:
NOTICE: min-age=30d and min-size=500M
Would transfer 39 files
11. Sync old static assets
Input command:
rclone sync /srv/site remote:archive/site --min-age 21d --dry-run
Expected output:
NOTICE: static files older than 21d selected
Would copy 67 files, delete 0 files
12. Verbose rule verification
Input command:
rclone copy /srv/docs remote:archive/docs --min-age 36h --dry-run -vv
Expected output:
DEBUG: Excluded (too new): handbook/new-page.mdx
INFO : 1 age filter rule active
13. Incremental cleanup export
Input command:
rclone copy /var/log remote:archive/log --min-age 3d --max-size 200M --dry-run
Expected output:
NOTICE: selected old logs under 200M
Would transfer 74 files
14. Monthly old report offload
Input command:
rclone copy /srv/reports remote:cold/reports --min-age 60d --dry-run
Expected output:
NOTICE: report offload window 60d
Would transfer 31 files
15. Safe run before production
Input command:
rclone sync /srv/app remote:archive/app --min-age 7d --dry-run -vv
Expected output:
NOTICE: dry-run enabled, no writes performed
Would transfer 95 files