{"id":123,"date":"2010-04-28T08:57:39","date_gmt":"2010-04-28T08:57:39","guid":{"rendered":"https:\/\/www.taywa.ch\/blog\/?p=123"},"modified":"2010-04-28T09:23:40","modified_gmt":"2010-04-28T09:23:40","slug":"komprimieren-von-apache-cronlog-logfiles","status":"publish","type":"post","link":"https:\/\/www.taywa.ch\/blog\/server\/komprimieren-von-apache-cronlog-logfiles\/","title":{"rendered":"komprimieren von apache-cronolog logfiles"},"content":{"rendered":"<p>wir setzen cronolog f\u00fcr die apache ein, diese werden unkomprimiert abgespeichert:<\/p>\n<p>im apache config sieht es so aus:<\/p>\n<p><code><br \/>\nErrorLog \"|\/usr\/bin\/cronolog \/var\/log\/apache2\/com.example\/%Y\/error_log.%Y-%m\"<br \/>\nCustomLog \"|\/usr\/bin\/cronolog \/var\/log\/apache2\/com.example\/%Y\/access_log.%Y-%m\" combined<br \/>\n<\/code><\/p>\n<p>bzw f\u00fcr das jahr 2010 und mai<br \/>\n<code><br \/>\n\/var\/log\/apache2\/com.example\/2010\/access_log.2010-04<br \/>\n<\/code><\/p>\n<p>um die logfiles vom vormonat einmal im monat zu komprimieren diese script, wir nennen es cronologcompress in \/etc\/cron.monthly\/ ablegen:<\/p>\n<p>cronologcompress in \/etc\/cron.monthly\/<br \/>\n<code><br \/>\n#!\/bin\/sh<br \/>\ncd \/var\/log\/apache2\/<br \/>\ngzip *\/*\/*-`date -d'-1 month' +'%m'`<br \/>\n<\/code><\/p>\n<p>thats it!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>wir setzen cronolog f\u00fcr die apache ein, diese werden unkomprimiert abgespeichert: im apache config sieht es so aus: ErrorLog &#8222;|\/usr\/bin\/cronolog \/var\/log\/apache2\/com.example\/%Y\/error_log.%Y-%m&#8220; CustomLog &#8222;|\/usr\/bin\/cronolog \/var\/log\/apache2\/com.example\/%Y\/access_log.%Y-%m&#8220; combined bzw f\u00fcr das jahr 2010 und mai \/var\/log\/apache2\/com.example\/2010\/access_log.2010-04 um die logfiles vom vormonat einmal im monat zu komprimieren diese script, wir nennen es cronologcompress in \/etc\/cron.monthly\/ ablegen: cronologcompress in \/etc\/cron.monthly\/<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60,57],"tags":[189,61,62,188],"class_list":["post-123","post","type-post","status-publish","format-standard","hentry","category-apache","category-server","tag-apache","tag-cronolog","tag-log","tag-server"],"_links":{"self":[{"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/posts\/123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/comments?post=123"}],"version-history":[{"count":8,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/posts\/123\/revisions"}],"predecessor-version":[{"id":131,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/posts\/123\/revisions\/131"}],"wp:attachment":[{"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/media?parent=123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/categories?post=123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/tags?post=123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}