Delete recycle bin files after x Days #1701
Replies: 1 comment
-
This would be a case for the Data Retention action, run from a Schedule trigger rule. CAUTION: I haven't actually tested this myself, and Data Retention can delete your files (that's kind of the point), so make backups first. The docs are not as clear as they might be, but from this part of the Event Manager page, it looks like the action will trigger once for each user matching the trigger. Actions with built-in paths use the context of the user that triggered the action, so if all of your users have individual recycle directories that they see as "/recycle-bin" when logged in, you could just have one Action:
Then you'll need the Rule to trigger it:
If you have different recycle-bin arrangements for different users, you will need to either create multiple "Data retention check" actions (and trigger them selectively so the right users run the right actions), or trigger the action as a user who can see the whole directory tree and set up separate path entries in the Action definition (be sure that the trigger only fires for one user in this case). REMINDER: I haven't tested this. Back up your files, use VM snapshots if you can, and try it in a test environment. Don't blame me if something goes wrong and all your files get eaten, because I won't be able to help. |
Beta Was this translation helpful? Give feedback.
-
Does anyone know how to configure a Event Rule to trigger a action who deletes files older than X days?
Beta Was this translation helpful? Give feedback.
All reactions