crontab for Zimbra user

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Leesbian
Posts: 26
Joined: Fri Sep 12, 2014 10:34 pm

crontab for Zimbra user

Postby Leesbian » Mon Oct 01, 2007 6:40 am

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...


anthony.rasat
Posts: 15
Joined: Fri Sep 12, 2014 10:39 pm

crontab for Zimbra user

Postby anthony.rasat » Mon Oct 01, 2007 10:59 am

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


# 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

Leesbian
Posts: 26
Joined: Fri Sep 12, 2014 10:34 pm

crontab for Zimbra user

Postby Leesbian » Mon Oct 01, 2007 11:07 am

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.
Leesbian
Posts: 26
Joined: Fri Sep 12, 2014 10:34 pm

crontab for Zimbra user

Postby Leesbian » Mon Oct 01, 2007 11:17 am

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 :D
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 :
# 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
rickvv
Advanced member
Advanced member
Posts: 101
Joined: Fri Sep 12, 2014 10:21 pm

crontab for Zimbra user

Postby rickvv » Tue Oct 02, 2007 8:44 am

Will this be a good backup script for a standard OS Edition 4.5.6, on Fedora5?
mmorse
Ambassador
Ambassador
Posts: 6036
Joined: Fri Sep 12, 2014 10:24 pm

crontab for Zimbra user

Postby mmorse » Tue Oct 02, 2007 10:33 am

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/)
Leesbian
Posts: 26
Joined: Fri Sep 12, 2014 10:34 pm

crontab for Zimbra user

Postby Leesbian » Wed Oct 03, 2007 6:43 am

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 :(
mmorse
Ambassador
Ambassador
Posts: 6036
Joined: Fri Sep 12, 2014 10:24 pm

crontab for Zimbra user

Postby mmorse » Wed Oct 03, 2007 10:21 am

/forums/administrators/10104-error-account-auth_failed-authentication-failed-zimbra.html

/forums/administrators/4043-zmbackup-authentication-failed.html

Bug 17553 - zmbackup reports authentication failed after Disaster Recovery

[url=Resetting LDAP & MySQL Passwords - ZimbraWiki[/url]
bjared
Advanced member
Advanced member
Posts: 51
Joined: Fri Sep 12, 2014 10:12 pm

crontab for Zimbra user

Postby bjared » Wed Nov 14, 2007 3:46 pm

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 user="Leesbian"]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.[/QUOTE]
mmorse
Ambassador
Ambassador
Posts: 6036
Joined: Fri Sep 12, 2014 10:24 pm

crontab for Zimbra user

Postby mmorse » Wed Nov 14, 2007 4:09 pm

lol - I assume you've already searched - but if you still need info on it:

CLI zmschedulebackup Network Edition only - Zimbra :: Wiki

/docs/ne/latest/administration_guide/10_Backup_Restore.13.1.html

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 12 guests