Results 1 to 3 of 3

Thread: Upgrade 6.0.4 -> 6.0.5 : Lost CRON jobs

Hybrid View

  1. #1
    Join Date
    Oct 2009
    Location
    Dublin, IRELAND
    Posts
    712
    Rep Power
    7

    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 10:39 AM.

  2. #2
    Join Date
    Jun 2008
    Location
    Berkeley, CA
    Posts
    1,474
    Rep Power
    9

    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 http://www.zimbra.com/forums/install...b-missing.html 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

  3. #3
    Join Date
    Oct 2009
    Location
    Dublin, IRELAND
    Posts
    712
    Rep Power
    7

    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.

Similar Threads

  1. Replies: 4
    Last Post: 05-31-2010, 08:11 PM
  2. upgrade 6.0.2 > 6.0.4 - 0 byte long attachments
    By tdemeter in forum Administrators
    Replies: 25
    Last Post: 03-19-2010, 02:12 AM
  3. Replies: 2
    Last Post: 01-05-2010, 01:04 AM
  4. [SOLVED] Zimbra logwatch.
    By nishith in forum Administrators
    Replies: 5
    Last Post: 06-10-2009, 05:42 PM
  5. Replies: 2
    Last Post: 02-12-2008, 11:55 AM

Posting Permissions

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