Results 1 to 6 of 6

Thread: Zimbra logs permanence

  1. #1
    Join Date
    Jul 2011
    Posts
    5
    Rep Power
    4

    Default Zimbra logs permanence

    Hello,

    i need to change zimbra logs permanence 8 to 365

    i have already change crontab file:

    30 2 * * * find /opt/zimbra/log/ -type f -name \*.log\* -mtime +8 -exec rm {} \; > /dev/null 2>&1
    35 2 * * * find /opt/zimbra/log/ -type f -name \*.out.???????????? -mtime +8 -ex ec rm {} \; > /dev/null 2>&1

    to

    30 2 * * * find /opt/zimbra/log/ -type f -name \*.log\* -mtime +365 -exec rm {} \; > /dev/null 2>&1
    35 2 * * * find /opt/zimbra/log/ -type f -name \*.out.???????????? -mtime +365 -ex ec rm {} \; > /dev/null 2>&1


    Need to change something else?

    Thanks

  2. #2
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by jbermudez View Post
    i need to change zimbra logs permanence 8 to 365
    You really don't want to do that unless you have plenty of HD space, the files can get rather large and any errors in the log levels may fill up your HD space with the possibility of taking your server down. I'd suggest you set-up a separate syslog server (Splunk has a free version) and send the files to that.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    Join Date
    Jul 2011
    Posts
    5
    Rep Power
    4

    Default

    Quote Originally Posted by phoenix View Post
    You really don't want to do that unless you have plenty of HD space, the files can get rather large and any errors in the log levels may fill up your HD space with the possibility of taking your server down. I'd suggest you set-up a separate syslog server (Splunk has a free version) and send the files to that.
    A law requires us to keep the log for 1 year

  4. #4
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by jbermudez View Post
    A law requires us to keep the log for 1 year
    Yes and you can keep them for as long as you like on a syslog server.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  5. #5
    Join Date
    Jul 2011
    Posts
    5
    Rep Power
    4

    Default

    Thanks, I will study this option. But if I decide to leave it, should I change any file more?

  6. #6
    Join Date
    Jul 2011
    Posts
    5
    Rep Power
    4

    Default

    i found something more.

    in /etc/logrotate.d/zimbra

    /var/log/zimbra.log {
    daily
    missingok
    notifempty
    create 0644 zimbra zimbra
    postrotate
    kill -HUP `cat /var/run/syslog*.pid 2> /dev/null` 2> /dev/null || true
    su - zimbra -c "/opt/zimbra/bin/zmswatchctl restart" > /dev/null 2>&1 || true
    endscript
    compress
    }

    -rw-r--r--. 1 zimbra zimbra 1111362 Sep 3 03:10 zimbra.log-20110903.gz
    -rw-r--r--. 1 zimbra zimbra 749125 Sep 4 03:16 zimbra.log-20110904.gz
    -rw-r--r--. 1 zimbra zimbra 661842 Sep 5 03:20 zimbra.log-20110905.gz


    How can i keep those compressed files 365 days?
    Last edited by jbermudez; 09-05-2011 at 09:04 AM.

Similar Threads

  1. Major Issue - 5.0RC2 NE to 5.0GA NE failed
    By DougWare in forum Installation
    Replies: 7
    Last Post: 01-06-2008, 08:56 PM
  2. Zimbra shutdowns every n hours.
    By Andrewb in forum Administrators
    Replies: 13
    Last Post: 08-14-2007, 08:55 AM
  3. zmtlsctl give LDAP error
    By sourcehound in forum Administrators
    Replies: 5
    Last Post: 03-11-2007, 03:48 PM
  4. Replies: 8
    Last Post: 02-27-2007, 03:10 AM
  5. Fedora Core 3, Clean Install - Not working!
    By pcjackson in forum Installation
    Replies: 17
    Last Post: 03-05-2006, 06:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •