Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-05-2011, 05:33 AM
Junior Member
 
Posts: 5
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
Reply With Quote
  #2 (permalink)  
Old 09-05-2011, 05:42 AM
Zimbra Consultant & Moderator
 
Posts: 20,315
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
Reply With Quote
  #3 (permalink)  
Old 09-05-2011, 05:45 AM
Junior Member
 
Posts: 5
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
Reply With Quote
  #4 (permalink)  
Old 09-05-2011, 05:51 AM
Zimbra Consultant & Moderator
 
Posts: 20,315
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
Reply With Quote
  #5 (permalink)  
Old 09-05-2011, 06:02 AM
Junior Member
 
Posts: 5
Default

Thanks, I will study this option. But if I decide to leave it, should I change any file more?
Reply With Quote
  #6 (permalink)  
Old 09-05-2011, 08:34 AM
Junior Member
 
Posts: 5
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..
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.