Page 1 of 4 123 ... LastLast
Results 1 to 10 of 36

Thread: Error in backup Script

  1. #1
    jay.choklsi is offline Senior Member
    Join Date
    Apr 2008
    Location
    India
    Posts
    59
    Rep Power
    7

    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

  2. #2
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Please run and post the final output where it fails
    Code:
    sh -x zmbac.sh --INSTALL

  3. #3
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,569
    Rep Power
    57

    Default

    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  4. #4
    jay.choklsi is offline Senior Member
    Join Date
    Apr 2008
    Location
    India
    Posts
    59
    Rep Power
    7

    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

  5. #5
    jay.choklsi is offline Senior Member
    Join Date
    Apr 2008
    Location
    India
    Posts
    59
    Rep Power
    7

    Default

    i have read that thread but didn't found any solutions.
    Regards,
    Jay Choksi

  6. #6
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    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.

  7. #7
    jay.choklsi is offline Senior Member
    Join Date
    Apr 2008
    Location
    India
    Posts
    59
    Rep Power
    7

    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

  8. #8
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Make sure the permissions on /Backup/zimbra_dars/ are open for writing including the parent folder /Backup which is off the root mountpoint.

  9. #9
    jay.choklsi is offline Senior Member
    Join Date
    Apr 2008
    Location
    India
    Posts
    59
    Rep Power
    7

    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

  10. #10
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    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.

Page 1 of 4 123 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 658
    Last Post: 04-04-2014, 09:01 AM
  2. [SOLVED] Error running mailboxd after script backup
    By ttortosa in forum Administrators
    Replies: 5
    Last Post: 10-22-2008, 01:33 AM
  3. Zimbra Backup Script ... Small Problem
    By frankb in forum Administrators
    Replies: 12
    Last Post: 07-14-2008, 08:40 AM
  4. Replies: 2
    Last Post: 05-20-2008, 11:56 AM
  5. [SOLVED] Backups failing, "unable to read metadata for account"
    By smcgrath1111 in forum Administrators
    Replies: 10
    Last Post: 04-10-2008, 03:15 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
  •