PASTAplus / DataPortal

EDI Data Portal
3 stars 3 forks source link

Add cronjob to remove uploaded data #125

Closed servilla closed 6 months ago

servilla commented 6 months ago

Add a "root" owned cronjob to remove uploaded data from /var/lib/tomcat9/webapp/nis/data on an hourly basis. The proposed cron entry would be:

0 * * * * find /var/lib/tomcat9/webapps/nis/data -mtime +1 -type d | xargs rm -rf

Where find -mtime +1 -type d returns a list of directories in the .../nis/data directory that are older than 1 day (24 hours).