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
  #161 (permalink)  
Old 10-06-2009, 10:48 AM
Advanced Member
 
Posts: 191
Default

This is what I get after running the script:

diff Backup started at: 00:00
Setting date & version Marker into /opt/zimbra/DATE_VERSION.txt
Doing a hotsync of /opt/zimbra/ to /tmp/fakebackups/
file has vanished: "/opt/zimbra/store/incoming/1254801588073-89.msg"
rsync warning: some files vanished before they could be transferred (code 24) at main.c(977) [sender=2.6.9]
rsync threw a hotsync error. this is not unusual, continuing...
Disabling the Zimbra crontab...
Stopping the Zimbra server...

Host zimbra.my.account.com
Stopping stats...Done.
Stopping mta...Done.
Stopping spell...Done.
Stopping snmp...Done.
Stopping archiving...Done.
Stopping antivirus...Done.
Stopping antispam...Done.
Stopping imapproxy...Done.
Stopping memcached...Done.
Stopping mailbox...Done.
Stopping logger...Done.
Stopping ldap...Done.
Doing a fast cold sync...
Reinstating Zimbra's crontab...
Starting Zimbra...
Host zimbra.my.account.com
Starting ldap...Done.
Starting logger...Done.
Starting mailbox...Done.
Starting antispam...Done.
Starting antivirus...Done.
Starting snmp...Done.
Starting spell...Done.
Starting mta...Done.
Starting stats...Done.
Service down time was - Hr:0 Min:2 Sec:21
Running A hack... This one to check and start Stats subsystem
Hack not needed Stats seems to be running fine...
Writing a diff backup: 40_UHC_Zimbra_Backup_06-October-2009_DIFF
into: /backup/zimbra_dars/ with file sizes of max: 4395M
Saving Unencrtyped Archive...
nice: invalid option -- s
Try `nice --help' for more information.
Dar had a problem!
/etc/cron.daily/zmbak: line 127: mail: command not found


What am I missing in this script for the dar to have problem. Also, what is it about line 127: mail: command not found?
Reply With Quote
  #162 (permalink)  
Old 10-08-2009, 10:17 PM
Active Member
 
Posts: 30
Default

More tweaks..

I have the script send an email each night, and now that I fixed the uuencode problem by installing sharutils I was receiving a 1MB+ file listing attachment each morning. I never read these, and I could do without an extra 370MB of data being added to my mail server each year (admin mail is rarely deleted, bad but fact).

The following tweak adds an option to enable/disable the attachment of the XX_Zimbra_Backup_DD-Month-Year.LIST.txt.gz files. Please note that the filenames in the snippets have been changed as per my last post.

First, add an option in the config area of the script:

Code:
#--- Log Settings ---#
EMAIL="xxxxx@xxx.xxxxxxx.xxx"	# the address to send logs to
EMAILCC="xxx@xxxxx.xxx"		# another address to send to
LOG="/opt/zimbra_backup.log"	# log location
ATTACHLIST="no"			# attach backup file or not?
Then head to the section that generates the email (around line 770):

Code:
# Script Timer
    STOPTIME=(`date +%s`)
    RUNTIME=$(expr $STOPTIME - $STARTTIME)
    echo
    echo "::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" 
    echo "Zimbra $TYPE backup ended at: `date +%H:%M`" 
    echo "Backup took $(date -d "1970-01-01 $RUNTIME sec" +%H:%M:%S) to complete" 
    echo "::::::::::::::::::::: cheers Osoffice for the script :::::::::::::::::"
	if [ "$ATTACHLIST" = "yes" ]
	then
	    (cat $LOG; $UUENCODE_BIN "$ARCHIVEDIR""$BACKUPWEEK"_"$BACKUPNAME"_"$BACKUPDATE"_LIST.txt.gz "$ARCHIVEDIR""$BACKUPWEEK"_"$BACKUPNAME"_"$BACKUPDATE"_LIST.txt.gz) \
    | mail -c $EMAILCC -s "Zimbra $TYPE Backup Log on $HOSTNAME" $EMAIL
	else
	    cat $LOG | mail -c $EMAILCC -s "Zimbra $TYPE Backup Log on $HOSTNAME" $EMAIL
	fi
	
}
Christian
Reply With Quote
  #163 (permalink)  
Old 10-08-2009, 10:56 PM
Active Member
 
Posts: 30
Default

Quote:
Originally Posted by borngunners View Post
What am I missing in this script for the dar to have problem. Also, what is it about line 127: mail: command not found?
The section of script that is throwing the error looks like this:

Code:
nice -19 $DAR_BIN -s $ARCHIVESIZE -z$COMPRESS......
The only way I can see 'nice' being sent an '-s' operator is if the content of the $DAR_BIN variable is null so the command becomes 'nice -19 -s'

Do you have DAR installed? ..what is the output of:

Code:
whereis dar | awk '{print $2}'
For the line 127 issue.. what do you get if you run the following command?

Code:
whereis mail | awk '{print $2}'
I suspect you don't have a dummy mta (e.g. mailx package) installed for the script's 'mail' commands to use. If you do, check $paths etc. for the root user to make sure it's found.

Christian
Reply With Quote
  #164 (permalink)  
Old 10-13-2009, 08:50 AM
Advanced Member
 
Posts: 191
Default

These are the response for the commands above:

Quote:
root@zimbra:~# whereis dar | awk '{print $2}'
/usr/bin/dar
Quote:
root@zimbra:~# whereis mail | awk '{print $2}'
/usr/bin/mail
I have installed a dummy mta and I still have an error with sending mail. Also, there is still a nice error after making the necessary changes you suggested above:

diff Backup started at: 00:00
Setting date & version Marker into /opt/zimbra/DATE_VERSION.txt
Doing a hotsync of /opt/zimbra/ to /srv/tmp/fakebackups/
Disabling the Zimbra crontab...
Stopping the Zimbra server...

Host zimbra.my.account.com
Stopping stats...Done.
Stopping mta...Done.
Stopping spell...Done.
Stopping snmp...Done.
Stopping archiving...Done.
Stopping antivirus...Done.
Stopping antispam...Done.
Stopping imapproxy...Done.
Stopping memcached...Done.
Stopping mailbox...Done.
Stopping logger...Done.
Stopping ldap...Done.
Doing a fast cold sync...
Reinstating Zimbra's crontab...
Starting Zimbra...
Host zimbra.my.account.com
Starting ldap...Done.
Starting logger...Done.
Starting mailbox...Done.
Starting antispam...Done.
Starting antivirus...Done.
Starting snmp...Done.
Starting spell...Done.
Starting mta...Done.
Starting stats...Done.
Service down time was - Hr:0 Min:2 Sec:9
Running A hack... This one to check and start Stats subsystem
Hack not needed Stats seems to be running fine...
Writing a diff backup: 41_UHC_Zimbra_Backup_13-October-2009_DIFF
into: /srv/zimbra_dars/ with file sizes of max: 4395M
Saving Unencrtyped Archive...
nice: invalid option -- s
Try `nice --help' for more information.
Dar had a problem!
mail: /usr/sbin/sendmail: No such file or directory
Can't send mail: sendmail process failed with error code 1
Unknown command: "sendmail="
Null message body; hope that's ok

Last edited by borngunners; 10-13-2009 at 09:02 AM..
Reply With Quote
  #165 (permalink)  
Old 10-13-2009, 09:23 AM
Advanced Member
 
Posts: 191
Default

These are the output:
Quote:
root@zimbra:~# whereis mail | awk '{print $2}'
/usr/bin/mail
Quote:
root@zimbra:~# whereis dar | awk '{print $2}'
/usr/bin/dar
Reply With Quote
  #166 (permalink)  
Old 10-13-2009, 09:30 AM
Active Member
 
Posts: 30
Default

what's the PATH statement for the root account?
Reply With Quote
  #167 (permalink)  
Old 10-13-2009, 09:31 AM
Advanced Member
 
Posts: 191
Default

what do you mean?
I always use su to access the root account and cd /root.

this is what I found in there:
dead.letter:
To: admin@zimbra.my.account.com
Subject: Zimbra backup error on zimbra.my.account.com
Cc: borngunners@my.account.com

To: admin@zimbra.my.account.com
Subject: Zimbra backup error on zimbra.my.account.com
Cc: borngunners@my.account.com
Reply With Quote
  #168 (permalink)  
Old 10-13-2009, 09:55 AM
Active Member
 
Posts: 30
Default

what's the permissions on the dar/mail binaries?
Reply With Quote
  #169 (permalink)  
Old 10-13-2009, 09:57 AM
Active Member
 
Posts: 30
Default

can you also post the output of $PATH for root accessed via "su - root" not "su root" or sudo
Reply With Quote
  #170 (permalink)  
Old 10-13-2009, 10:00 AM
Advanced Member
 
Posts: 191
Default

root@zimbra:/usr/bin# ls -l dar
-rwxr-xr-x 1 root root 252140 2007-09-19 07:04 dar
root@zimbra:/usr/bin# ls -l mail
-rwxr-xr-x 1 root root 80316 2007-10-24 05:20 mail
root@zimbra:/usr/bin#


root@zimbra:~# su - root
root@zimbra:~#
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.