X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/e995ca991a42a599d07fa87ae19a3ab650652de1..4226a607bcc0fbf418b9ae374af52651d67b8a52:/cookbooks/planet/templates/default/planet-notes-dump.cron.erb?ds=sidebyside 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