I am using Zimbra 7.1 and /var/log directory has 5 files:
zimbra.log
zimbra.log.1.gz
zimbra.log.2.gz
zimbra.log.3.gz
zimbra.log.4.gz
It seems that it could only save the last 4 days /var/log/zimbra.log file.
I want to save the last 365 days /var/log/zimbra.log file. How to do it?
How to rotate /var/log/zimbra.log for 365 days?
- justdave
- Advanced member
- Posts: 122
- Joined: Fri Sep 12, 2014 11:54 pm
- ZCS/ZD Version: 8.8.9.GA.3019.UBUNTU16.64 FOSS
How to rotate /var/log/zimbra.log for 365 days?
you can edit the rotation script in /etc/logrotate.d/zimbra
Check 'man logrotate' for the script syntax. you probably want to add a 'rotate 365' or somesuch, but I'd doublecheck the man page to make sure. Note that'll also use a lot of disk space. Make sure you have enough.
That file will get overwritten by the Zimbra installer any time you upgrade, so you'll need to remember to edit it again after an upgrade.
Check 'man logrotate' for the script syntax. you probably want to add a 'rotate 365' or somesuch, but I'd doublecheck the man page to make sure. Note that'll also use a lot of disk space. Make sure you have enough.
That file will get overwritten by the Zimbra installer any time you upgrade, so you'll need to remember to edit it again after an upgrade.