Hello, guys.
Is there a way to filter the maximum number of files?
Something that behaves like --max-files
, as in --max-age
or --max-size
?
Maybe some --filter
trick?
Let me explain.
I'm trying to do specific filtering to copy some backup files to the cloud once a day.
When filtering, a lot of options are working well, like in:
rclone lsf "D:\bkps" --exclude "*.log" --max-age 2h --order-by modtime,desc
This give me a good list of files: logs excluded; only newer than 2 hours; newer files first.
These files are auto-generated by a 3rdy-party application, 2 or 3 times over the day.
When using --max-age 2h
I'm getting the last needed backup files, well done.
But sometimes the 3rdy-party application fail or refuse to do the last-day backup (have no control over it), and the latest backup files was generated something like 7h ago. Or, worst case, 18h ago.
So, the best way seems to be use --max-age 24h
, as rclone runs one time a day.
But if all 3rdy-party backup files are generated, I'll copy 3 full backups - more than my cloud quota allows.
Well, as I know the number of generated files, I'm searching for an option to filter only the last (newest) 2 backup files on the past 24h. Is there a way?
I've tried some regex on filtering, but rclone don't seems to implement go regexp grouping.
Any help will be appreciated.
Maybe --max-files
(or max/min operations, objects) or something like that can be added as a feature, if it seems reasonable.
Sorry for the long post.
And thanks you, guys, for this amazing tool.
Really useful, versatile and well documented.
I'm really impressed.
rclone v1.51.0
Windows 7 Ultimate, 64 bits, pt-br
Microsoft OneDrive