we use nextcloud to provide files to our customers. Those files are downloaded once and will never be needed again.
My plan is to create a script, which deletes all files older than 3 days from the nextcloud storage.
Unfortunately, I’m neither a linux specialist nor versed in any nextcloud configurations. Our linux admin left the company, you can imagine it’s quite hard for me (as a Windows admin) to get into this topic.
Understand what you’re trying to achieve though surely this will be very messy as the nextcloud database will say one thing and the filesystem another.
Why not just use the retention plugin and set it to three days?
You can find the settings under “Admin” (where you configure everything) under the point “Workflow”.
Down on that page you see “File retention” then.
There you will also see the configuration of “Files automated tagging” what you would need. So you define to automatically tag files and files with these tags will be deleted after a defined time. Pretty nice this feature
That would work, yes.
But be aware and maybe double-check: now absolutely every file will be auto-tagged unless it is bigger than 100 GB. Are you sure you will never have any other file on the server which you would like to keep?
Just mentioning so that there will be no bad surprise