I can't find this answered in other similar topics... but how does one remove the folders (not files!) in my /inc/ folder on Google Drive that are older than x days?
Run the command 'rclone version' and share the full output of the command.
rclone v1.59.0
os/version: centos 7.9.2009 (64 bit)
os/kernel: 5.17.5-x86_64-linode154 (x86_64)
os/type: linux
os/arch: amd64
go/version: go1.18.3
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)
You aren't paying really anything for a directory. It's the files that cost money. So having a bunch of empty directories is really not significant to anything in terms of cost.
I'm still trying to understand how sync and deleting folders more than x days is a thing. What are you trying to make happen?
I read rclone delete only deleted files though not folders?
I am backing up all my website files. Say I have 200 websites in the /home/ folder. I am backing up that folder. I am doing it incrementally, so every changed file is in the /inc/DATE folder. I keep incremental files because sometimes we need to revert back to an old file, and normally we only need to do it within the last week or so. So over time I will have hundreds of /inc/DATE folders. I could delete all files and leave empty folders but its still really messy to have hundreds of empty folders inside my inc folders. I only need to retain files for say 7 or 14 days, I do not need to retain them for years.
I also have many servers, so did not want to manually delete all the old files from every server every so often.
Before Rclone I used my own rsync script to save them to a Raspberry PI USB. I have some issues with it hence wanting to move to Rclone, but in my own script I would run a bash script to delete the folders older than a certain date. I cant see how to do that in Rclone. I am surprised Rclone does not allow it, and you have to keep them all.
Based on that format, I'd write up a script to parse for dates I'd imagine and feed that set of directories into rclone delete to remove / prune older folders.