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 11-03-2008, 02:18 AM
Senior Member
 
Posts: 59
Default Error in backup Script

Dear Friends,

I have tried following backup scripts on my zimbra server.

Yet Another Backup Script for Zimbra Community Edition GroupWare Server*-*Open Source Office Lösungen

but when i am going to install, it will fail and my error is

[root@mail Sources]# sh zmbac.sh --INSTALL

zmbac.sh: line 411: [: =: unary operator expected


Please help me if anybodys no solutions. i am running Release 5.0.9_GA_2533.RHEL5_20080815132719 RHEL5 FOSS edition.
__________________
Regards,
Jay Choksi
Reply With Quote
  #2 (permalink)  
Old 11-03-2008, 02:23 AM
Moderator
 
Posts: 7,928
Default

Please run and post the final output where it fails
Code:
sh -x zmbac.sh --INSTALL
__________________
Reply With Quote
  #3 (permalink)  
Old 11-03-2008, 02:25 AM
Zimbra Consultant & Moderator
 
Posts: 20,312
Default

Read this thread: http://www.zimbra.com/forums/adminis...y-version.html
__________________
Regards


Bill
Reply With Quote
  #4 (permalink)  
Old 11-03-2008, 02:29 AM
Senior Member
 
Posts: 59
Default

hi,

Thanks for your reply. plese find the attached reports.

[root@mail Sources]# sh -x zmbac.sh --INSTALL
+ ZM_HOME=/opt/zimbra/
+ SYNC_DIR=/tmp/fakebackup/
+ ARCHIVEDIR=/Backup/zimbra_dars/
+ TOO_MEDIA_DIR=/Backup/burn/
+ RSYNC_OPTS='-aHK --delete --exclude=*.pid'
+ BACKUPNAME=Zimbra_Backup
+ BACKUPTYPE_F=FULL
+ BACKUPTYPE_D=DIFF
++ date +%d-%B-%Y
+ BACKUPDATE=03-November-2008
+ CRYPT=yes
+ PASSDIR=/etc/zmbac/
+ PASSFILE=noread
+ EMAIL=jay.choksi@mail.hitechos.com
+ EMAILCC=
+ LOG=/var/log/zim_backup.log
+ STATHACK=yes
+ '[' '!' -d /opt/zimbra/ ']'
+ ROOT_UID=0
+ '[' 0 -ne 0 ']'
+ touch /var/log/zim_backup.log
+ STARTTIME=(`date +%s`)
++ date +%s
++ date +%W
+ BACKUPWEEK=44
++ ps -ef
++ grep /opt/zimbra/
++ grep java
++ grep -v zmmailboxdmgr
++ head -n 1
++ awk '{print $1}'
+ ZM_USER=zimbra
+ '[' -z zimbra ']'
+ '[' zimbra = root ']'
+ STATPIDBASE=/opt/zimbra/zmstat/pid/
+ case $1 in
+ '[' '!' -d /tmp/fakebackup/ ']'
+ '[' '!' -d /Backup/zimbra_dars/ ']'
+ '[' '!' -d /Backup/burn/ ']'
++ whereis mailx
++ awk '{print $2}'
+ MAILX=/bin/mailx
+ '[' '!' -e /bin/mailx ']'
++ whereis uuencode
++ awk '{print $2}'
+ UUENCODE=/usr/share/man/man1p/uuencode.1p.gz
+ '[' '!' -e /usr/share/man/man1p/uuencode.1p.gz ']'
++ whereis dar
++ awk '{print $2}'
+ DAR_BIN=/etc/dar
+ '[' '!' -e /etc/dar ']'
++ whereis ssh
++ awk '{print $2}'
+ SSH_BIN=/usr/bin/ssh
+ '[' '!' -e /usr/bin/ssh ']'
+ '[' yes = yes ']'
+ '[' '!' -d /etc/zmbac/ ']'
+ '[' '!' -e /etc/zmbac/noread ']'
+ echo

+ '[' = yes ']'
zmbac.sh: line 411: [: =: unary operator expected
+ echo

+ echo 'Install cronjob to automate the nightly backups'
Install cronjob to automate the nightly backups
+ echo -n 'install y or n: '
install y or n: + read ANSWER
n
+ '[' n = y ']'
+ exit 0
__________________
Regards,
Jay Choksi
Reply With Quote
  #5 (permalink)  
Old 11-03-2008, 02:31 AM
Senior Member
 
Posts: 59
Default

i have read that thread but didn't found any solutions.
__________________
Regards,
Jay Choksi
Reply With Quote
  #6 (permalink)  
Old 11-03-2008, 02:33 AM
Moderator
 
Posts: 7,928
Default

Looks like you have a old version of that script at it should be setting the variable DRCP to either yes or no. It is falling over as that variable has not been declared. Easy solution would be to put quotes around the variables being checked.
__________________
Reply With Quote
  #7 (permalink)  
Old 11-03-2008, 02:53 AM
Senior Member
 
Posts: 59
Default

hi,

Now above problem has been resolved but now i am facing another problem when running this script with -f option instead of --INSTALL.

Below is output of error.

[root@mail Sources]# sh zmbac.sh -f

Full Backup started at: 16:16

No old backups found

Setting date & version Marker into /opt/zimbra/DATE_VERSION.txt

Doing a hotsync of /opt/zimbra/ to /tmp/fakebackup/
sync went ok

Stopping the Zimbra server

Deactivated zimbra's cronjobs

Host localhost.localdomain
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 mailbox...Done
Stopping logger...Done
Stopping ldap...Done

Zimbra server has stopped

kill any left over zimbra procs
Did a Mr. Bush on some left over procs...

Doing a fast cold sync...
sync went ok

Reinstated zimbra's cronjobs

Host localhost.localdomain
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.

Zimbra has started

Service down time was - Hr:0 Min:1 Sec:52

Running A hack... This one to check and start Stats subsystem
Hack not needed Stats seems to be running fine...

All services are running


Writing a full backup called:
44_Zimbra_Backup_03-November-2008_FULL
in: /Backup/zimbra_dars/ with file sizes of max:
Archive is Encrypted
nice: /etc/dar: Permission denied

Dar had a problem!
No message, no subject; hope that's ok
__________________
Regards,
Jay Choksi
Reply With Quote
  #8 (permalink)  
Old 11-03-2008, 02:55 AM
Moderator
 
Posts: 7,928
Default

Make sure the permissions on /Backup/zimbra_dars/ are open for writing including the parent folder /Backup which is off the root mountpoint.
__________________
Reply With Quote
  #9 (permalink)  
Old 11-03-2008, 03:07 AM
Senior Member
 
Posts: 59
Default

hi,

i have check the permission on /backup folder it is full i mean 777. also same permission on /etc/dar folder.
__________________
Regards,
Jay Choksi
Reply With Quote
  #10 (permalink)  
Old 11-03-2008, 03:09 AM
Moderator
 
Posts: 7,928
Default

Run the script again using sh -x so that you can see the actual commands being executed. This will make it easier to diagnose your problem.
__________________
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.