I use rclone to upload my CCTV footage.
Now the Partition is 50 GB so i can have a lot of videos to upload.
On the other hand i have 35 GB in Mega and need to keep it under a max value of etc. 30 GB to insure i can upload the newest recordings.
I propose that "rclone delete" gets a so called filter where one could tell it that there may max be used 30GB og space and to delete the oldest files first until the limit has been reached.
I really hope this could be implemented since the camera is recording on motion so i cant predict that it will take etc. 7 days or 2 weeks to use 30 GB and then delete oldest based on age.
I need to delete oldest files based on the space in use in the current folder.
Hope this can be implemented and thank you for reading.
Hi thank you for your reply.
I must say i have no experience in scripting and no idea of where to begin.
I do understand that i can run etc.
rclone size Remote:/CCTV
And get a size like
Total objects: 258
Total size: 20.106 GiByte (21588537743 bytes)
Even if i were able to write a script.
I do not understand how that would make it possible to delete the oldest files first on "Remote:" with the current "rclone delete" command and filters.
And mix that with stopping when its reached the max size. Which is related to the "rclone size" command.
wouldn't it be a useful future to have in "rclone" to be able to delete oldest files based on a max size in th e "rclone delete" command.
If its first implemented i would believe people could make good use of that.
rclone lsf... lists the files, sort -r sorts them in reverse aphabetical so the newest are first, tail -n +100 shows any lines remaining after the first 100.