--min-age seems inconsistent

What is the problem you are having with rclone?

Rclone not obeying --min-age as I expect. Maybe it's looking at modified time instead of creation time?

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

╰─λ rclone --version
rclone v1.58.0

  • os/version: arch Soaring (64 bit)
  • os/kernel: 5.16.16-zen1-1-zen (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.18
  • go/linking: dynamic
  • 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 move $HOME/Downloads/ gdrive:Backups/Devices/Lenovo\ PC/Downloads --min-age 6d --delete-empty-src-dirs -P

The rclone config contents with secrets removed.

[gdrive]
type = drive
scope = drive
token =
team_drive =
client_id =
client_secret =

A log from the command with the -vv flag

2022/04/05 13:34:33 DEBUG : --min-age 6d to 2022-03-30 13:34:33.988524738 -0500 CDT m=-518399.971686629
2022/04/05 13:34:33 DEBUG : rclone: Version "v1.58.0" starting with parameters ["rclone" "move" "." "gdrive:TEST" "--min-age" "6d" "--delete-empty-src-dirs" "-P" "-vv"]
2022/04/05 13:34:33 DEBUG : Creating backend with remote "."
2022/04/05 13:34:33 DEBUG : Using config file from "/home/matt/.config/rclone/rclone.conf"
2022/04/05 13:34:33 DEBUG : fs cache: renaming cache item "." to be canonical "/home/matt/Downloads/test"
2022/04/05 13:34:33 DEBUG : Creating backend with remote "gdrive:TEST"
2022/04/05 13:34:34 DEBUG : Google drive root 'TEST': 'root_folder_id = SNIP' - save this in the config to speed up startup
2022-04-05 13:34:37 DEBUG : Google drive root 'TEST': Waiting for checks to finish
2022-04-05 13:34:37 DEBUG : Google drive root 'TEST': Waiting for transfers to finish
2022-04-05 13:34:39 DEBUG : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: Sending chunk 0 length 8388608
2022-04-05 13:34:39 DEBUG : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: Sending chunk 8388608 length 8388608
2022-04-05 13:34:40 DEBUG : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: Sending chunk 16777216 length 8388608
2022-04-05 13:34:40 DEBUG : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: Sending chunk 25165824 length 8388608
2022-04-05 13:34:40 DEBUG : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: Sending chunk 33554432 length 8388608
2022-04-05 13:34:41 DEBUG : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: Sending chunk 41943040 length 8388608
2022-04-05 13:34:41 DEBUG : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: Sending chunk 50331648 length 8388608
2022-04-05 13:34:42 DEBUG : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: Sending chunk 58720256 length 8388608
2022-04-05 13:34:42 DEBUG : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: Sending chunk 67108864 length 8388608
2022-04-05 13:34:43 DEBUG : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: Sending chunk 75497472 length 8388608
2022-04-05 13:34:44 DEBUG : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: Sending chunk 83886080 length 8388608
2022-04-05 13:34:44 DEBUG : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: Sending chunk 92274688 length 8388608
2022-04-05 13:34:45 DEBUG : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: Sending chunk 100663296 length 8388608
2022-04-05 13:34:46 DEBUG : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: Sending chunk 109051904 length 3989548
2022-04-05 13:34:47 DEBUG : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: md5 = a28cd735aed771c7e44541ef433892f2 OK
2022-04-05 13:34:47 INFO  : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: Copied (new)
2022-04-05 13:34:47 INFO  : I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm: Deleted

Also,

 ╰─λ stat I\ Tried\ \$400\ Brain\ Boosting\ Pills\ \[ik6hON7IasA\].webm 
  File: I Tried $400 Brain Boosting Pills [ik6hON7IasA].webm
  Size: 113041452 	Blocks: 220792     IO Block: 4096   regular file
Device: 0,41	Inode: 6068203     Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/    matt)   Gid: ( 1001/    matt)
Access: 2021-11-19 21:15:23.000000000 -0600
Modify: 2021-11-19 21:15:23.000000000 -0600
Change: 2022-04-05 12:38:09.156059864 -0500
 Birth: 2022-04-05 12:38:08.941056921 -0500

rclone always uses modtime, with a few exceptions.

and can best test filters by using rclone ls,

Any way I can have it use creation time instead of modtime?

might test
rclone ls gdrive:Backups/Devices/Lenovo --drive-use-created-date --min-age 6d

I was just reading about that flag. If I'm understanding it correctly, it won't help my use-case, but I'll test it out.

Yep. Same result.

well, what is that, what do you need help with?

Sorry, I guess that wasn't obvious from the rclone move command.

I'm going to run a cron job to basically clean up my Downloads folder. I'd like to remove anything that's a week old. I figure, if I haven't used a file in a week and moved it to a properly organized place by then, "safely delete it" by moving it to a backup directory on gdrive.

how do you define used,
as i can use a read-only file by opening it in a text editor.
that would not change the modtime.

fwiw, write a simple bash script to find whatever files you need.
and then feed that to --include-from

1 Like

how do you define used,

Good point.
Just anything that's still in that directory after it's creation date.

Ha! Brilliant! Thank you.

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