Page 63 of 66 FirstFirst ... 13536162636465 ... LastLast
Results 621 to 630 of 659

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

  1. #621
    Join Date
    Jan 2013
    Posts
    8
    Rep Power
    2

    Default

    Quote Originally Posted by TheChief79 View Post
    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!

    What should be correct syntax for running mdb_copy?

    I put this line into my script:
    /opt/zimbra/openldap/bin/mdb_copy /opt/zimbra/data/ldap/mdb/db /opt/zimbra/ldap-backup/`date +%s`

    but I keep getting the following error when running the backup script:
    mdb_env_copy failed, error 2 No such file or directory

  2. #622
    Join Date
    Nov 2012
    Location
    Chernigov (Ukraine)
    Posts
    9
    Rep Power
    3

    Default

    Quote Originally Posted by xenonsky View Post
    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!

    rsync: write failed on "/tmp/fakebackup/data/ldap/mdb/db/data.mdb": No space left on device (28)
    you have no space on your HDD

  3. #623
    Join Date
    Jan 2013
    Posts
    9
    Rep Power
    2

    Default

    Quote Originally Posted by xenonsky View Post
    What should be correct syntax for running mdb_copy?

    I put this line into my script:
    /opt/zimbra/openldap/bin/mdb_copy /opt/zimbra/data/ldap/mdb/db /opt/zimbra/ldap-backup/`date +%s`

    but I keep getting the following error when running the backup script:
    mdb_env_copy failed, error 2 No such file or directory
    It works for me running as root and as zimbra user: /opt/zimbra/openldap/bin/mdb_copy /opt/zimbra/data/ldap/mdb/db /tmp

    ls -l /tmp
    -rw-r--r-- 1 root root 1171456 Feb 14 10:19 data.mdb

  4. #624
    Join Date
    Jan 2013
    Posts
    8
    Rep Power
    2

    Default

    finally changing from: /opt/zimbra/openldap/bin/mdb_copy /opt/zimbra/data/ldap/mdb/db /opt/zimbra/ldap-backup/`date +%s`

    to: /opt/zimbra/openldap/bin/mdb_copy /opt/zimbra/data/ldap/mdb/db /opt/zimbra/ldap-backup

    and now everything works.


    When restore the data.mdb just mdb_copy the other way should work then? without having the file size bloated to 85GB again, right?

  5. #625
    Join Date
    Jan 2013
    Posts
    9
    Rep Power
    2

    Default

    Yes, just copy back the file. On restore i didnt use mdb_copy (made just normal copy), but it also should work.

    When you start your new restored zimbra, the file will grow again over 80gig. mdb_copy is just useful to make a backup without the big ldap sparse file, but with real size file.

  6. #626
    Join Date
    Jan 2013
    Posts
    8
    Rep Power
    2

    Default

    Thanks guys for all the help here, my backup script is working with version 8.0.2

  7. #627
    Join Date
    Sep 2008
    Location
    Brazil
    Posts
    50
    Rep Power
    7

    Default

    Quote Originally Posted by xenonsky View Post
    Thanks guys for all the help here, my backup script is working with version 8.0.2
    friend,
    post your backup script please?
    thanks

  8. #628
    Join Date
    Jan 2013
    Posts
    8
    Rep Power
    2

    Default

    Attached is the modified script I'm using.

    Changed RSYNC option from this:
    RSYNC_OPTS="-aHK --delete --exclude=*.pid"

    to this:
    RSYNC_OPTS="-aHK --delete --exclude=data/ldap/mdb/db/data.mdb --exclude=*.pid"

    Between 1st RSYNC and 2nd Quick RSYNC I added the following two lines to remove any existing previous copy of mdb files from /opt/zimbra/ldap-backup (may have to create this folder manually and change permission like "chmod 777" on ldap-backup folder) , then do the mdb_copy, and let 2nd quick RSYNC back it up.

    rm /opt/zimbra/ldap-backup/*.mdb

    /opt/zimbra/openldap/bin/mdb_copy /opt/zimbra/data/ldap/mdb/db /opt/zimbra/ldap-backup

    Hope this works for everyone.
    Attached Files Attached Files
    Last edited by xenonsky; 04-03-2013 at 03:10 AM. Reason: update script file

  9. #629
    Join Date
    Jun 2009
    Posts
    195
    Rep Power
    6

    Default

    I have tried to install the backup script and I am having trouble with the following mta dummy link wget http://ubuntu.lnix.net/misc/mta-dumm...my_1.0_all.deb

    --2013-03-20 10:02:09-- (try: 2) http://ubuntu.lnix.net/misc/mta-dumm...my_1.0_all.deb
    Connecting to ubuntu.lnix.net (ubuntu.lnix.net)|81.26.52.3|:80... failed: Connection timed out.
    Retrying.

    --2013-03-20 10:03:14-- (try: 3) http://ubuntu.lnix.net/misc/mta-dumm...my_1.0_all.deb
    Connecting to ubuntu.lnix.net (ubuntu.lnix.net)|81.26.52.3|:80... failed: Connection timed out.
    Retrying.

    --2013-03-20 10:04:20-- (try: 4) http://ubuntu.lnix.net/misc/mta-dumm...my_1.0_all.deb
    Connecting to ubuntu.lnix.net (ubuntu.lnix.net)|81.26.52.3|:80... ^C

    It looks like the link is not valid. Anywhere else I can get the mta dummy to install manually.

    Thanks

  10. #630
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    7

    Default

    Quote Originally Posted by borngunners View Post
    It looks like the link is not valid. Anywhere else I can get the mta dummy to install manually.
    I think mta-dummy is gone from newer Ubuntu. Try this:
    http://www.zimbra.com/forums/adminis...tml#post215050
    Alternately, you could install sendmail or xmail, or postfix (which comes with its own sendmail for compatibility), but you'll need to be sure to disable any of their startup services. Lastly, you can point the default sendmail to use the one that comes with Zimbra, How to "fix" system's sendmail to use that of zimbra - Zimbra :: Wiki.
    Last edited by LaFong; 04-07-2013 at 12:18 AM.

Similar Threads

  1. Zimbra Backup Script ... Small Problem
    By frankb in forum Administrators
    Replies: 12
    Last Post: 07-14-2008, 09: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, 10:36 AM
  5. [SOLVED] Simple backup question...
    By dameron in forum Administrators
    Replies: 3
    Last Post: 08-25-2007, 10: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
  •