Page 62 of 66 FirstFirst ... 12526061626364 ... LastLast
Results 611 to 620 of 659

Thread: [SOLVED] Yet Another Backup Script for Community Version

  1. #611
    m0ps is offline Junior Member
    Join Date
    Nov 2012
    Location
    Chernigov (Ukraine)
    Posts
    9
    Rep Power
    2

    Default

    SHELL=/bin/bash
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    30 18 * * 1 /bin/bash /opt/scripts/zmbak_v.0.8.sh -f > /var/log/zim_backup.log 2>&1
    35 22 * * 2-7 /bin/bash /opt/scripts/zmbak_v.0.8.sh -d >> /var/log/zim_backup.log 2>&1
    it in root's crontab? if it in /etc/crontab it may be

    SHELL=/bin/bash
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    30 18 * * 1 root /bin/bash /opt/scripts/zmbak_v.0.8.sh -f > /var/log/zim_backup.log 2>&1
    35 22 * * 2-7 root /bin/bash /opt/scripts/zmbak_v.0.8.sh -d >> /var/log/zim_backup.log 2>&1

  2. #612
    liverpoolfcfan's Avatar
    liverpoolfcfan is online now Outstanding Member
    Join Date
    Oct 2009
    Location
    Dublin, IRELAND
    Posts
    710
    Rep Power
    6

    Default

    I am still running 7.2.1 of zimbra for the moment but have seen several posts about people having issues with rsync based backups since upgrading to version 8.0.n - all to do with a new sparse 85GB data.mdb file

    Perhaps a solution to the problem would be to add/modify the functionality of the script as follows:

    1. Prior to running rsync - perform a backup of the LDAP database using the approved technique putting the backup somewhere within the /opt/zimbra folder tree - For Ref https://bugzilla.zimbra.com/show_bug.cgi?id=78781#c4

    2. add a specific exclude to the rsync command(s) --exclude=/opt/zimbra/data/ldap/mdb/db/data.mdb (I believe that is the path to the offending file)

    I believe this would provide a backup of the ldap and would stop the rsync from hanging for a long period of time while trying to figure out what the contents of the data.mdb are - and would also prevent the backup from failing due to an "apparent" lack of disk space.

  3. #613
    maxxer's Avatar
    maxxer is offline Trained Alumni
    Join Date
    Feb 2009
    Location
    Lecco, Italy
    Posts
    552
    Rep Power
    7

    Default

    anyone knows how to restore, after modifying the script this way?
    I mean, in the past unzipping all the backed up stuff was enought to restore Zimbra from this backup.
    How to deal with the missing ldap data after this?
    Could it be:
    Code:
    unzip stuf
    su - zimbra
    ldap start
    /opt/zimbra/libexec/zmslapadd <filename>
    ldap stop
    zmcontrol start
    YetOpen S.r.l. ~ Your open source partner
    Lecco (LC) - ITALY
    http://www.yetopen.it

  4. #614
    bma
    bma is offline Intermediate Member
    Join Date
    Jun 2009
    Posts
    18
    Rep Power
    6

    Default

    Hi blason,
    Have you solved your crontab problem. I am facing the same issue.
    the crontab worked fine for a long time, but when I changed the backup path, I got the Stopping mailbox...Failed error.

  5. #615
    xenonsky is offline Junior Member
    Join Date
    Jan 2013
    Posts
    8
    Rep Power
    2

    Default

    I'm facing the exact same issue after updated from 8.0.1 to 8.0.2, anyone have a working example of the modified backup script can share please !

  6. #616
    bma
    bma is offline Intermediate Member
    Join Date
    Jun 2009
    Posts
    18
    Rep Power
    6

    Default

    Quote Originally Posted by xenonsky View Post
    I'm facing the exact same issue after updated from 8.0.1 to 8.0.2, anyone have a working example of the modified backup script can share please !
    this works to me: add zimbra to PATH
    SHELL=/bin/bash
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/zimbra/bin:/opt/zimbra/postfix/sbin:/opt/zimbra/openldap/bin:/opt/zimbra/snmp/bin:/opt/zimbra/rsync/bin:/opt/zimbra/bdb/bin:/opt/zimbra/openssl/bin:/opt/zimbra/java/bin

  7. #617
    xenonsky is offline Junior Member
    Join Date
    Jan 2013
    Posts
    8
    Rep Power
    2

    Default

    Quote Originally Posted by bma View Post
    this works to me: add zimbra to PATH
    SHELL=/bin/bash
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/zimbra/bin:/opt/zimbra/postfix/sbin:/opt/zimbra/openldap/bin:/opt/zimbra/snmp/bin:/opt/zimbra/rsync/bin:/opt/zimbra/bdb/bin:/opt/zimbra/openssl/bin:/opt/zimbra/java/bin
    Thanks for the tips, I've just added the path to /etc/crontab and rebooted, then manually try to run a full backup and still got the same error:

    Doing a hotsync of /opt/zimbra/ to /tmp/fakebackup/
    rsync: writefd_unbuffered failed to write 4 bytes to socket [sender]: Broken pipe (32)
    rsync: write failed on "/tmp/fakebackup/data/ldap/mdb/db/data.mdb": No space left on device (28)
    rsync error: error in file IO (code 11) at receiver.c(301) [receiver=3.0.6]
    rsync: connection unexpectedly closed (981 bytes received so far) [sender]
    rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]
    rsync threw a hotsync error. this is not unusual, continuing...

    any modification required for the original zmbak_v.0.8.sh script?

    Thanks!

  8. #618
    blason is offline Elite Member
    Join Date
    Sep 2011
    Posts
    255
    Rep Power
    3

    Default

    Well that actaully did not resolve the issue but I done the trick and so far backup is running fine.

    I commented out a original zimbra stop line and added

    zmmailboxd stop && /etc/init.d/zimbra stop

  9. #619
    xenonsky is offline Junior Member
    Join Date
    Jan 2013
    Posts
    8
    Rep Power
    2

    Default

    Blason,
    Do you mean changing the following section from the zmback_v.0.8.sh ?

    # Stopping Zimbra
    echo "Stopping the Zimbra server..."
    echo
    su - $ZM_USER -c $ZM_HOME"bin/zmcontrol stop"
    if [ "$?" -eq "1" ]
    then
    echo "zmcontrol shutdown had an error!"
    mail_log
    exit 1
    fi


    to the following:


    # Stopping Zimbra
    echo "Stopping the Zimbra server..."
    echo
    #su - $ZM_USER -c $ZM_HOME"bin/zmcontrol stop"
    zmmailboxd stop && /etc/init.d/zimbra stop
    if [ "$?" -eq "1" ]
    then
    echo "zmcontrol shutdown had an error!"
    mail_log
    exit 1
    fi

  10. #620
    TheChief79 is offline Junior Member
    Join Date
    Jan 2013
    Posts
    9
    Rep Power
    2

    Default

    Last time i had to backup and restore my Zimbra 8.0.2. For the ldap database i used the tool mdb_copy which is included in zimbra.

    So maybe this is a good way:

    1. rsync zimbra to backup directory and exclude ldap db (maybe --exclude=/opt/zimbra/data/ldap/mdb/db/data.mdb)
    2. Stop zimbra and copy the ldap database with mdb_copy (usage: mdb_copy srcpath dstpath). This will not copy the whole sparse file, it will copy the real size file.
    3. Maybe rsync again
    4. Start zimbra

    mdb_copy worked great for me.

    To restore on a new server:

    1. I installed Zimbra (same verison) with ./install.sh -s
    2. Moved the new Installation with mv /opt/zimbra /opt/zimbra_new
    3. Copied the backup into /opt/zimbra
    4. Started Zimbra
    5. Ran the installer again with ./install.sh

    Works!

Page 62 of 66 FirstFirst ... 12526061626364 ... LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Zimbra Backup Script ... Small Problem
    By frankb in forum Administrators
    Replies: 12
    Last Post: 07-14-2008, 08:40 AM
  2. Debian - Upgrade from 4.5.6
    By magikman in forum Installation
    Replies: 1
    Last Post: 01-19-2008, 12:59 PM
  3. Backup script issues
    By SSS in forum Administrators
    Replies: 18
    Last Post: 12-03-2007, 09:56 AM
  4. 4.0.4 to 4.5.6 upgrade failed in network edition
    By chenthil in forum Administrators
    Replies: 1
    Last Post: 08-27-2007, 09:36 AM
  5. [SOLVED] Simple backup question...
    By dameron in forum Administrators
    Replies: 3
    Last Post: 08-25-2007, 09:36 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
  •