How to reset MinAge to its default value

Hi

I am trying to set and reset the MinAge through the options/set command as follow:

rclone rc options/set --json '{"filter":{"MinAge":<age in nano sec>}}' --rc-addr=<ip:port> --rc-user=<user> --rc-pass=<pass>

No problem to set the MinAge. But how can I totally remove such filter and ensure there is no MinAge limit. I mean when you run rclone rcd there is no filter regarding the min age. And the MinAge is 9223372036854776000 by default.

Thanks

Absolutely no idea, but Nick might be able to give you something to work of...

@ncw

I think setting it to 2**63-1 should do it... 9223372036854775807

I'm not 100% certain that will work though!

Thanks for reply

Actually I already tried it. Do you mean

--json '{"filter":{"MinAge":9223372036854775807 }}'

It returns:
Reshape failed to Unmarshal: json: cannot unmarshal number 9223372036854776000 into Go struct field Opt.MinAge of type fs.Duration

It also shows ceiling of the number !

Try using the string "off" - that is what the command line parser would use and I think it uses the same parser.

--json '{"filter":{"MinAge":"off" }}'

Reshape failed to Unmarshal: json: cannot unmarshal string into Go struct field Opt.MinAge of type fs.Duration",

I also tried without quote

I guess that needs some more work then!

Do you want to make a new issue on github about this?

Done!
Let me know if I need to add more info
Thanks a lot :slightly_smiling_face:

1 Like

meanwhile how about to set the min age to a negative value? Is it a safe workaround?

If you look at the debug log of the server you'll see the cutoff set, so I think you probably want a very large negative number

Yes looking at debug log I ended up with such idea :wink:
I think -1d should be safe!