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 02-11-2010, 09:33 AM
Elite Member
 
Posts: 469
Default Upgrade 6.0.4 -> 6.0.5 : Lost CRON jobs

I upgraded to 6.0.5 two days ago.

At the front end everything looks to be going OK - but for some reason my zimbra cron jobs have all disappeared.

/var/spool/cron has a zimbra file in there - but it is ZERO bytes long.

-rw------- 1 root root 0 Feb 11 01:01 zimbra

Any idea why this would have happened ?

Is there a way to regenerate it easily ?

EDIT

I just searched further and found the following files in the /tmp folder - dated at the time I ran the upgrade.

-r--r--r-- 1 root root 3087 Feb 10 08:58 crontab.zimbra
-rw-r--r-- 1 root root 3021 Feb 10 08:58 crontab.zimbra.orig
-rw-r--r-- 1 root root 0 Feb 10 08:58 crontab.zimbra.proc

It seems like the upgrade broke something here.



Thanks

Last edited by liverpoolfcfan; 02-11-2010 at 09:39 AM..
Reply With Quote
  #2 (permalink)  
Old 04-01-2010, 03:59 PM
Moderator
 
Posts: 1,432
Default

I just ran into a similar situation but caused by my error. (Let us speak no more of this...)

The point is I needed to recreate my crontab. Referring to the thread My crontab is missing I found that one option was to reinstall zimbra. The poster with that suggestion also wrote that one could alternatively run /opt/zimbra/libexec/zmsetup.pl. But this does more than I wanted. So I looked in zmsetup.pl and I saw that it builds the new crontab in /tmp/crontab.zimbra, then installs it with crontab -u zimbra /tmp/crontab.zimbra. Since I was sure the install on my system had gone okay, and I could trust /tmp/crontab.zimbra, I just ran that command as root.

Then to restore the default backup settings (which are missing), I ran zmschedulebackup -D as zimbra.

In your case it's possible that the /tmp/crontab.zimbra file isn't complete so you might be better off reinstalling or running zmsetup.pl.

But you can compare to the crontab.zimbra from my system, which is similar but not identical to yours. (See below.) You're running CentOS, I'm on RHEL, you have FOSS, I have NE. Probably the only differences are in the backup section, which shouldn't exist in the FOSS edition.

Obviously I can't guarantee any of this will work for you but now maybe you have some ideas to work with, if you haven't already solved your problem.
Code:
# ZIMBRASTART -- DO NOT EDIT ANYTHING BETWEEN THIS LINE AND ZIMBRAEND
#
# Log pruning
#
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 -exec rm {} \; > /dev/null 2>&1
#
# Status logging
#
*/2 * * * * /opt/zimbra/libexec/zmstatuslog
#*/10 * * * * /opt/zimbra/libexec/zmdisklog
#
# SSL Certificate Expiration Checks
#
0 0 1 * * /opt/zimbra/libexec/zmcheckexpiredcerts -days 30 -email
#
# Backups
#
# BACKUP BEGIN
# BACKUP END
#
# crontab.ldap
#
#
#
# crontab.store
#
# Log pruning
#
30 2 * * * find /opt/zimbra/mailboxd/logs/ -type f -name \*log\* -mtime +8 -exec rm {} \; > /dev/null 2>&1
30 2 * * * find /opt/zimbra/log/ -type f -name stacktrace.\* -mtime +8 -exec rm {} \; > /dev/null 2>&1
#
# Table maintenance
#
30 1 * * 7 /opt/zimbra/libexec/zmmaintaintables >> /dev/null 2>&1
#
# Report on any database inconsistencies
#
0 23 * * 7 /opt/zimbra/libexec/zmdbintegrityreport -m
#
# Monitor for multiple mysqld to prevent corruption
#
*/5 * * * * /opt/zimbra/libexec/zmcheckduplicatemysqld -e > /dev/null 2>&1
#
# Check zimbraVersionCheckURL for new update. 
# Only runs if this server matches zimbraVersionCheckServer 
# Only executes on zimbraVersionCheckInterval. min 2h interval
#
18 */2 * * * /opt/zimbra/libexec/zmcheckversion -c >> /dev/null 2>&1
#
# crontab.logger
#
# process logs
#
00,10,20,30,40,50 * * * * /opt/zimbra/libexec/zmlogprocess > /tmp/logprocess.out 2>&1
#
# Graph generation
#
#10 * * * * /opt/zimbra/libexec/zmgengraphs >> /tmp/gengraphs.out 2>&1
#
# Daily reports
#
30 23 * * * /opt/zimbra/libexec/zmdailyreport -m
#
# crontab.mta
#
#
# Queue logging
#
0,10,20,30,40,50 * * * * /opt/zimbra/libexec/zmqueuelog
#
# Spam training
#
0 23 * * * /opt/zimbra/bin/zmtrainsa >> /opt/zimbra/log/spamtrain.log 2>&1
#
# Spam training cleanup
#
45 23 * * * /opt/zimbra/bin/zmtrainsa --cleanup >> /opt/zimbra/log/spamtrain.log 2>&1
#
# Dspam cleanup
#
0 1 * * * [ -d /opt/zimbra/data/dspam/data/z/i/zimbra/zimbra.sig ] && find /opt/zimbra/data/dspam/data/z/i/zimbra/zimbra.sig/ -type f -name \*sig -mtime +7 -exec rm {} \; > /dev/null 2>&1
8 4 * * * [ -f /opt/zimbra/data/dspam/system.log ] && /opt/zimbra/dspam/bin/dspam_logrotate -a 60 -l /opt/zimbra/data/dspam/system.log
8 8 * * * [ -f /opt/zimbra/data/dspam/data/z/i/zimbra/zimbra.log ] && /opt/zimbra/dspam/bin/dspam_logrotate -a 60 -l /opt/zimbra/data/dspam/data/z/i/zimbra/zimbra.log
#
# Spam Bayes auto-expiry
#
20 23 * * * /opt/zimbra/libexec/sa-learn -p /opt/zimbra/conf/salocal.cf --dbpath /opt/zimbra/data/amavisd/.spamassassin --siteconfigpath /opt/zimbra/conf/spamassassin --force-expire --sync > /dev/null 2>&1 
# 
# Clean up amavisd/tmp
#
15 5,20 * * * find /opt/zimbra/data/amavisd/tmp -maxdepth 1 -type d -name 'amavis-*' -mtime +1 -exec rm -rf {} \; > /dev/null 2>&1
#
# Clean up the quarantine dir
#
0 1 * * * find /opt/zimbra/data/amavisd/quarantine -type f -mtime +7 -exec rm -f {} \; > /dev/null 2>&1

# ZIMBRAEND -- DO NOT EDIT ANYTHING BETWEEN THIS LINE AND ZIMBRASTART
__________________
Elliot Wilen
Berkeley, CA

Don't forget to enter your Zimbra version in your forum profile.
Reply With Quote
  #3 (permalink)  
Old 04-02-2010, 01:02 PM
Elite Member
 
Posts: 469
Default

Thank you for taking the time to post.

I am reasonably sure everything is in the version I found in the tmp folder, as everything appears to have been working correctly ever since I restored that one.

I will likely upgrade to 6.0.6 next week - so will watch out to see if anything happens this time round.
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.