X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/e995ca991a42a599d07fa87ae19a3ab650652de1..9bca5f05185dde08efcf2d5f1a2bf66c8cdc9f00:/cookbooks/planet/templates/default/planet-notes-dump.cron.erb diff --git a/cookbooks/planet/templates/default/planet-notes-dump.cron.erb b/cookbooks/planet/templates/default/planet-notes-dump.cron.erb index 0db348698..3c5709af1 100644 --- a/cookbooks/planet/templates/default/planet-notes-dump.cron.erb +++ b/cookbooks/planet/templates/default/planet-notes-dump.cron.erb @@ -1,2 +1,5 @@ MAILTO=grant-smaug@firefishy.com 0 3 * * * www-data /usr/local/bin/planet-notes-dump + +#Delete Planet Notes dump files older than 8 days +10 8 * * * www-data find /store/planet/notes/20??/ -maxdepth 1 -type f -iname 'planet-notes-??????.osn*' -printf '\%T@ \%p\n' | sort -k 1nr | sed 's/^[^ ]* //' | tail -n +17 | xargs -r rm -f