Results 1 to 10 of 10

Thread: crontab for Zimbra user

  1. #1
    Join Date
    May 2007
    Location
    London, UK
    Posts
    26
    Rep Power
    8

    Default crontab for Zimbra user

    Hi people,

    Can somebody reply with the crontab entry for the Zimbra user?

    I've been trying to fix the crontab since I upgraded to 4.5.6 from 4.5.3 - and followed the upgrade instructions, which say you should choose no to enabing automatic backups... but doesn't say how to re-enable them (and uncommenting from the crontab didn't seem to work...)

    Anyway, long story short - I screwed up my crontab beyond reconginition, and need a fresh copy

    Cheers...

  2. #2
    Join Date
    Jul 2007
    Location
    Jakarta, Indonesia
    Posts
    15
    Rep Power
    8

    Default

    This is from crontab under zimbra-4.5.6_GA_FC5 (but I dont think it would matter):

    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
    #
    # Status logging
    #
    */2 * * * * /opt/zimbra/libexec/zmstatuslog
    */10 * * * * /opt/zimbra/libexec/zmdisklog
    #
    # Backups
    #
    # BACKUP BEGIN
    # BACKUP END
    #
    # crontab.ldap
    #
    #
    #
    # crontab.store
    #
    # Log pruning
    #
    30 2 * * * find /opt/zimbra/tomcat/logs/ -type f -name \*log\* -mtime +8 -exec rm {} \; > /dev/null 2>&1
    0 2 * * * /opt/zimbra/libexec/zmroll_catalina > /dev/null 2>&1
    #
    # Purge messages
    #
    0 3 * * * /opt/zimbra/libexec/zmpurgemessages > /dev/null 2>&1
    #
    # Clean up the quarantine dir
    #
    0 1 * * * find /opt/zimbra/amavisd/quarantine -type f -mtime +7 -exec rm -f {} \; > /dev/null 2>&1
    #
    # Table maintenance
    #
    30 1 * * * /opt/zimbra/libexec/zmmaintaintables >> /dev/null 2>&1
    #
    # Report on any database inconsistencies
    #
    0 23 * * 7 /opt/zimbra/libexec/zmdbintegrityreport -m
    #
    # crontab.logger
    #
    # process logs
    #
    00,10,20,30,40,50 * * * * /opt/zimbra/libexec/zmlogprocess > /tmp/logprocess.out 2>&1
    #
    # Graph generation
    #
    10 1 * * * /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 * * * find /opt/zimbra/dspam/var/dspam/data/z/i/zimbra/zimbra.sig/ -type f -name \*sig -mtime +7 -exec rm {} \; > /dev/null 2>&1
    #8 4 * * * /opt/zimbra/dspam/bin/dspam_logrotate -a 60 /opt/zimbra/dspam/var/dspam/system.log
    #8 8 * * * /opt/zimbra/dspam/bin/dspam_logrotate -a 60 /opt/zimbra/dspam/var/dspam/data/z/i/zimbra/zimbra.log
    #
    # Spam Bayes auto-expiry
    #
    20 23 * * * /opt/zimbra/libexec/sa-learn --force-expire --sync > /dev/null 2>&1
    #
    # Clean up amavisd/tmp
    #
    15 5,20 * * * find /opt/zimbra/amavisd/tmp -maxdepth 1 -type d -name 'amavis-*' -mtime +1 -exec rm -rf {} \; > /dev/null 2>&1
    # ZIMBRAEND -- DO NOT EDIT ANYTHING BETWEEN THIS LINE AND ZIMBRASTART

    Regards,

    Anthony M. Rasat
    Technical, Network and Support Division
    PT. Jawa Pos National Network
    Jakarta - Indonesia

  3. #3
    Join Date
    May 2007
    Location
    London, UK
    Posts
    26
    Rep Power
    8

    Default

    Thanks - that's a start, but you're also missing the backup schedule.

    I think I can restore it into the crontab using the zmbackupschedule command, but for some reason my crontab just wasn't being read... maybe it's because it's meant for a different version of cron other than vixie, which appears to be what is installed by default on my (Rackspace) RHEL4 server.

  4. #4
    Join Date
    May 2007
    Location
    London, UK
    Posts
    26
    Rep Power
    8

    Default

    Aha! I've been able to reconstruct my crontab - I also changed the entry for the log pruning to check it was running, and it's deleted some logs, so it looks like it is indeed working

    If it fails to backup tonight, then I know that I need to look at something else other than cron causing the problem.

    Anyway, the full crontab is here :

    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
    #
    # Status logging
    #
    */2 * * * * /opt/zimbra/libexec/zmstatuslog
    */10 * * * * /opt/zimbra/libexec/zmdisklog
    #
    # Backups
    #
    # BACKUP BEGIN
    0 1 * * 6 /opt/zimbra/bin/zmbackup -f -a all
    40 4 * * 0-5 /opt/zimbra/bin/zmbackup -i -a all
    0 0 * * * /opt/zimbra/bin/zmbackup -del 1m
    # BACKUP END
    #
    # crontab.ldap
    #
    #
    #
    # crontab.store
    #
    # Log pruning
    #
    30 2 * * * find /opt/zimbra/tomcat/logs/ -type f -name \*log\* -mtime +8 -exec rm {} \; > /dev/null 2>&1
    0 2 * * * /opt/zimbra/libexec/zmroll_catalina > /dev/null 2>&1
    #
    # Purge messages
    #
    0 3 * * * /opt/zimbra/libexec/zmpurgemessages > /dev/null 2>&1
    #
    # Clean up the quarantine dir
    #
    0 1 * * * find /opt/zimbra/amavisd/quarantine -type f -mtime +7 -exec rm -f {} \; > /dev/null 2>&1
    #
    # Table maintenance
    #
    30 1 * * * /opt/zimbra/libexec/zmmaintaintables >> /dev/null 2>&1
    #
    # Report on any database inconsistencies
    #
    0 23 * * 7 /opt/zimbra/libexec/zmdbintegrityreport -m
    #
    # crontab.logger
    #
    # process logs
    #
    00,10,20,30,40,50 * * * * /opt/zimbra/libexec/zmlogprocess > /tmp/logprocess.out 2>&1
    #
    # Graph generation
    #
    10 1 * * * /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 * * * find /opt/zimbra/dspam/var/dspam/data/z/i/zimbra/zimbra.sig/ -type f -name \*sig -mtime +7 -exec rm {} \; > /dev/null 2>&1
    #8 4 * * * /opt/zimbra/dspam/bin/dspam_logrotate -a 60 /opt/zimbra/dspam/var/dspam/system.log
    #8 8 * * * /opt/zimbra/dspam/bin/dspam_logrotate -a 60 /opt/zimbra/dspam/var/dspam/data/z/i/zimbra/zimbra.log
    #
    # Spam Bayes auto-expiry
    #
    20 23 * * * /opt/zimbra/libexec/sa-learn --force-expire --sync > /dev/null 2>&1
    #
    # Clean up amavisd/tmp
    #
    15 5,20 * * * find /opt/zimbra/amavisd/tmp -maxdepth 1 -type d -name 'amavis-*' -mtime +1 -exec rm -rf {} \; > /dev/null 2>&1
    # ZIMBRAEND -- DO NOT EDIT ANYTHING BETWEEN THIS LINE AND ZIMBRASTART

  5. #5
    Join Date
    Nov 2006
    Location
    Minneapolis, MN
    Posts
    101
    Rep Power
    9

    Default

    Will this be a good backup script for a standard OS Edition 4.5.6, on Fedora5?

  6. #6
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    zmbackup & zmrestore aren't included in the FOSS
    See a bunch of methods here: Open Source Edition Backup Procedure - ZimbraWiki (essentially your copying /opt/zimbra/)

  7. #7
    Join Date
    May 2007
    Location
    London, UK
    Posts
    26
    Rep Power
    8

    Default

    Hmm... OK, crontab is now working, backups still AREN'T working...

    when I try and run the zmbackup command manually, I get the following...


    [zimbra@mailhost ~]$ zmbackup -i -a all
    Error occurred: authentication failed for zimbra

    I tried specifying the -s/--server switch and adding the canonical name of my server, but it still bails

    Anyone have any idea how I can fix this? at the moment I'm still having to manually do a full backup every day

  8. #8
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

  9. #9
    Join Date
    Jun 2006
    Location
    Indianapolis, IN
    Posts
    51
    Rep Power
    9

    Default You fooled me, darnit.

    I just searched for "zmbackupschedule" and received ONLY this thread. It's because the command is really, "zmschedulebackup". (I was trying to find
    it via command-line tab-completion too...)

    Anyway, just an FYI for anyone else who finds this thread and wonders about
    that command.

    --Brian

    Quote Originally Posted by Leesbian View Post
    Thanks - that's a start, but you're also missing the backup schedule.

    I think I can restore it into the crontab using the zmbackupschedule command, but for some reason my crontab just wasn't being read... maybe it's because it's meant for a different version of cron other than vixie, which appears to be what is installed by default on my (Rackspace) RHEL4 server.

  10. #10
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

Similar Threads

  1. Replies: 21
    Last Post: 02-04-2010, 10:06 AM
  2. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 11:38 AM
  3. Getting problems in FC4 while instalation
    By kitty_bhoo in forum Installation
    Replies: 13
    Last Post: 09-12-2006, 11:34 PM
  4. Services stopped working
    By lilwong in forum Administrators
    Replies: 4
    Last Post: 08-15-2006, 10:19 AM
  5. Fedora Core 3, Clean Install - Not working!
    By pcjackson in forum Installation
    Replies: 17
    Last Post: 03-05-2006, 07: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
  •