What is the problem you are having with rclone?
I'd like to copy files and filter them using the --min-age
and --max-age
flags together.
RClone produces the below error, even though my specified dates look like they are correct.
After reading the documentation carefully, it looks like I put the dates the wrong way around, but the error message is what confused me and led me to believe it was correct.
2024/01/10 09:38:56 filter: --min-age can't be larger than --max-age
Run the command 'rclone version' and share the full output of the command.
rclone-v1.65.1 version
rclone v1.65.1
- os/version: Microsoft Windows 10 Enterprise 21H2 (64 bit)
- os/kernel: 10.0.19044.3448 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.21.5
- go/linking: static
- go/tags: cmount
Which cloud storage system are you using? (eg Google Drive)
Seems to occur regardless of cloud storage system. I'm using Amazon S3.
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone-v1.65.1 copy remote1:path1 remote2:path2 --min-age 2024-01-01 --max-age 2024-01-11 -vv
Per above, min age is smaller than max age but the rclone log error message appears to say otherwise.
The rclone config contents with secrets removed.
Paste config here
A log from the command with the -vv
flag
rclone-v1.65.1 copy remote1:path1 remote2:path2 --min-age 2024-01-01 --max-age 2024-01-11 -vv
2024/01/10 09:46:42 DEBUG : --min-age 1.3439192519117062w to 2024-01-01 00:00:00.0022475 +0200 SAST m=-812801.671461699
2024/01/10 09:46:42 filter: --min-age can't be larger than --max-age
Suggested fix
It is clearer now that --min-age must be AFTER --max-age, but in my opinion that means it must be LARGER. The error message says that min can't be larger than max.
Presumably this is because --min-age 2d and --max-age 4d would be correct and this is when max is "larger than" min - even though it means that min is AFTER max.
I suggest the error message is changed to reflect this:
filter: --min-age can't refer to a point in time before --max-age