<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: arhive script help. in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/arhive-script-help/m-p/4954325#M46667</link>
    <description>Shalom, &lt;BR /&gt;&lt;BR /&gt;You can actually download a tool that does it for you. Its called logrotate.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-2.5/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-2.5/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It hasn't been updated in a while but it works very nicely. Its configurable to any log name or location.&lt;BR /&gt;&lt;BR /&gt;Just like Linux.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
    <pubDate>Mon, 23 Jan 2006 15:39:23 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2006-01-23T15:39:23Z</dc:date>
    <item>
      <title>arhive script help.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/arhive-script-help/m-p/4954324#M46666</link>
      <description>Hello, I would like to write a script that will run in the weekly cron job to archive the prior weeks logs. This is what I did originally..&lt;BR /&gt;&lt;BR /&gt;ls -l &lt;BR /&gt;&lt;BR /&gt;-rw-r--r--    1 postgres postgres 120859203 Jan 15 23:59 postgresql-2006-01-15_000000.log&lt;BR /&gt;-rw-r--r--    1 postgres postgres 940274970 Jan 16 23:58 postgresql-2006-01-16_000000.log&lt;BR /&gt;-rw-r--r--    1 postgres postgres 976725601 Jan 17 23:59 postgresql-2006-01-17_000000.log&lt;BR /&gt;-rw-r--r--    1 postgres postgres 970093678 Jan 18 23:59 postgresql-2006-01-18_000000.log&lt;BR /&gt;-rw-r--r--    1 postgres postgres 858010447 Jan 19 23:59 postgresql-2006-01-19_000000.log&lt;BR /&gt;-rw-------    1 postgres postgres 912979525 Jan 20 18:36 postgresql-2006-01-20_000000.log&lt;BR /&gt;-rw-------    1 postgres postgres 49227396 Jan 21 00:00 postgresql-2006-01-20_183708.log&lt;BR /&gt;-rw-------    1 postgres postgres 142989912 Jan 21 23:59 postgresql-2006-01-21_000000.log&lt;BR /&gt;-rw-------    1 postgres postgres 202722648 Jan 22 23:59 postgresql-2006-01-22_000000.log&lt;BR /&gt;-rw-------    1 postgres postgres 749064835 Jan 23 12:12 postgresql-2006-01-23_000000.log&lt;BR /&gt;&lt;BR /&gt;find /var/log/pgsql/* -type f -mtime +5 gzip {} \;&lt;BR /&gt;&lt;BR /&gt;Looks like this will work but it also touches the file currently in use..so now..&lt;BR /&gt;&lt;BR /&gt;I only need to select the *.logs created in the last 7 days and gzip them into a single archive for the week. &lt;BR /&gt;&lt;BR /&gt;MY goal here is archive everything except the file currently in use / being written to.</description>
      <pubDate>Mon, 23 Jan 2006 15:14:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/arhive-script-help/m-p/4954324#M46666</guid>
      <dc:creator>Ragni Singh</dc:creator>
      <dc:date>2006-01-23T15:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: arhive script help.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/arhive-script-help/m-p/4954325#M46667</link>
      <description>Shalom, &lt;BR /&gt;&lt;BR /&gt;You can actually download a tool that does it for you. Its called logrotate.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-2.5/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-2.5/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It hasn't been updated in a while but it works very nicely. Its configurable to any log name or location.&lt;BR /&gt;&lt;BR /&gt;Just like Linux.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 23 Jan 2006 15:39:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/arhive-script-help/m-p/4954325#M46667</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-01-23T15:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: arhive script help.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/arhive-script-help/m-p/4954326#M46668</link>
      <description>So you want to gzip old .log files, not touch the existing .gz files..&lt;BR /&gt;&lt;BR /&gt;find /var/log/pgsql -type f -name "*.log" -mtime +5 -exec gzip {} \;&lt;BR /&gt;&lt;BR /&gt;should do it.</description>
      <pubDate>Mon, 23 Jan 2006 15:40:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/arhive-script-help/m-p/4954326#M46668</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2006-01-23T15:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: arhive script help.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/arhive-script-help/m-p/4954327#M46669</link>
      <description>ERR, &lt;BR /&gt;&lt;BR /&gt;Thought I was posting to hpux.&lt;BR /&gt;&lt;BR /&gt;logrotate is built into Linux&lt;BR /&gt;&lt;BR /&gt;rpm -qa | grep logrotate&lt;BR /&gt;&lt;BR /&gt;chkconfig logroate on&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 23 Jan 2006 15:47:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/arhive-script-help/m-p/4954327#M46669</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-01-23T15:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: arhive script help.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/arhive-script-help/m-p/4954328#M46670</link>
      <description>Per-service configuration usually lives in '/etc/logrotate.d'.&lt;BR /&gt;&lt;BR /&gt;But 'logrotate' is designed to do the rotation for you, but it looks like Postgre is doing that, so.. I'm not sure if you can get it to just compress the logs..&lt;BR /&gt;&lt;BR /&gt;Worth looking into though ;)</description>
      <pubDate>Mon, 23 Jan 2006 16:05:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/arhive-script-help/m-p/4954328#M46670</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2006-01-23T16:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: arhive script help.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/arhive-script-help/m-p/4954329#M46671</link>
      <description>I have posted a new question.</description>
      <pubDate>Tue, 24 Jan 2006 12:52:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/arhive-script-help/m-p/4954329#M46671</guid>
      <dc:creator>Ragni Singh</dc:creator>
      <dc:date>2006-01-24T12:52:10Z</dc:date>
    </item>
  </channel>
</rss>

