Is dynamic --max-age in a mount possible?

What is the problem you are having with rclone?

Looking to have a mount file showing just files with date newer than 6 months. Currently I basically remount once a month and change the date manually, what I would love is to have the mount automatically "hide" anything that exceeds the max-date with a 6 month limit. Not sure if it would work or if it would need a feature request.

Run the command 'rclone version' and share the full output of the command.

$rclone version
rclone v1.58.0

  • os/version: centos 7.9.2009 (64 bit)
  • os/kernel: 3.10.0-1160.62.1.el7.x86_64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.17.8
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone mount ge2:movies /backup/Plex2/movies \
--allow-other \
--bind \
--dir-cache-time 4800h \
--cache-info-age 49h \
--poll-interval 15s \
--log-level INFO \
--use-mmap \
--cache-dir /tmp/rclone \
--drive-pacer-min-sleep 15ms \
--drive-pacer-burst 200 \
--max-age '2022-01-01' \
--log-file=/home/logs/rclone.log \
--rc \
--rc-addr localhost:5574

The rclone config contents with secrets removed.

Not needed

A log from the command with the -vv flag

Not needed

Yes, just use 6M

Rclone Filtering

Thanks! So mount would keep a dynamic filter of only showing last 6 months and hiding them as they age? I'll switch to 6m and keep and eye to confirm.

Appreciate the quick response.

I'm not 100% sure how the mount would do but that seems right to me.

I just had a quick look at the code, and I think the "6m" is turned into a date and time internally which is not updated as rclone runs. So you'll still have to restart rclone, but you won't have to change the command line!

Thanks for confirming Nick!

Yeah, I could simply restart rclone once a week and update it. This works great!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.