Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: ldap data.mdb after upgrade from 8.0.0 -> 8.0.1 has a size of 85GB

  1. #11
    Join Date
    Jul 2010
    Posts
    11
    Rep Power
    5

    Default

    As this is the first hit with google, this is my solution:

    If you backup with rsync then exclude the db first like: rsync <here your favourite parameters> --exclude 'data/ldap/mdb/db' /folder/to/zimbra /backup/folder/to/zimbra

    Then backup the ldap db with the provided tool 'mdb_copy' like:
    mdb_copy /folder/to/zimbra/data/ldap/mdb/db /backup/folder/to/zimbra/data/ldap/mdb/db

  2. #12
    Join Date
    Jan 2014
    Location
    USA
    Posts
    8
    Rep Power
    1

    Default

    Quote Originally Posted by gevezex View Post
    As this is the first hit with google, this is my solution:

    If you backup with rsync then exclude the db first like: rsync <here your favourite parameters> --exclude 'data/ldap/mdb/db' /folder/to/zimbra /backup/folder/to/zimbra

    Then backup the ldap db with the provided tool 'mdb_copy' like:
    mdb_copy /folder/to/zimbra/data/ldap/mdb/db /backup/folder/to/zimbra/data/ldap/mdb/db
    Not intending to necro this thread but I'm trying to write a script to take this into account and having a hard time getting the mdb_copy command to work outside of the zimbra user's account. When I try to pass it through via su I get a command not found error.

    Code:
    # su -c 'mdb_copy /opt/zimbra/data/ldap/mdb/db /backup' zimbra
    bash: mdb_copy: command not found
    I also tried
    Code:
    # su zimbra 'mdb_copy /opt/zimbra/data/ldap/mdb/db /backup'
    bash: mdb_copy /opt/zimbra/data/ldap/mdb/db /backup: Permission denied
    And the /backup directory was chown'd to zimbra:zimbra


    I tried to find a way to run mdb_copy as root but am only finding it inside of a compressed file
    Code:
    # find / -name mdb_copy
    /opt/zimbra/openldap-2.4.35.2z/bin/mdb_copy
    To goal is a script to:

    1. /etc/init.d/zimbra stop
    2. rsync all except the db to /backup
    3. /etc/init.d/zimbra start
    4. mdb_copy the db to it's necessary place in /backup
    5. Continue on with the rest of the backup procedure.


    Any pointers appreciated.

    -KK

  3. #13
    Join Date
    May 2007
    Location
    Zimbra
    Posts
    1,285
    Rep Power
    10

    Default

    This works for me:

    Code:
    [root@ldap01 quanah]# su - zimbra -c 'mdb_copy /opt/zimbra/data/ldap/mdb/db /backup/ldap01.zimbra.com'
    Quanah Gibson-Mount
    Server Architect
    Zimbra, Inc
    --------------------
    Zimbra :: the leader in open source messaging and collaboration

  4. #14
    Join Date
    Jan 2014
    Location
    USA
    Posts
    8
    Rep Power
    1

    Default

    Quote Originally Posted by quanah View Post
    This works for me:

    Code:
    [root@ldap01 quanah]# su - zimbra -c 'mdb_copy /opt/zimbra/data/ldap/mdb/db /backup/ldap01.zimbra.com'
    Thank you for reminding me that no matter how long I've been a tinker-linux-admin, I am still not doing it right!



    That did it.

  5. #15
    Join Date
    Apr 2010
    Posts
    13
    Rep Power
    5

    Default

    Quanah: I'm not understanding the mdb_copy. On Zimbra Wiki it says it will copy the real database size so the generated copied fle will not be a sparse file. If this is true, what If I just run this utility to overwrite the one Zimbra uses so I'll just get rid of the 80GB sparse file and continue using rsync as always??

    Is there something wrong with this idea?

  6. #16
    Join Date
    Apr 2010
    Posts
    13
    Rep Power
    5

    Default

    Hi people, I'm sorry I don't want to necropost but I'de really appreciate if somone has an answer. I don't get why I have to be forced to handle 80GB sparse files on my server that is just "a mess" to handle, we just added complexity in maintenance. If the official way to copy it is as the ZImbra wiki says, then the copy will give a non-sparse file. If that copy is coherent to the original, can't I just replace the copied non-sparse over the original fat 80gb file? If the answer is no, then please specify what the purpose of doing the mdb copy if then I can't restore it..

    Thanks!

  7. #17
    Join Date
    May 2007
    Location
    Zimbra
    Posts
    1,285
    Rep Power
    10

    Default

    You can restore the copy made via mdb_copy... And after you start slapd, it'll be transformed back into a sparse file. And there is nothing forcing you to have an 80GB sparse file. How to tune the size of the file is fully documented in the wiki. OpenLDAP Performance Tuning 8.0 - Zimbra :: Wiki
    Quanah Gibson-Mount
    Server Architect
    Zimbra, Inc
    --------------------
    Zimbra :: the leader in open source messaging and collaboration

  8. #18
    Join Date
    Apr 2010
    Posts
    13
    Rep Power
    5

    Default

    Quote Originally Posted by quanah View Post
    And after you start slapd, it'll be transformed back into a sparse file./url]
    Thanks quanah, that was my missing piece in the puzzle! I'll see how to handle this.

  9. #19
    Join Date
    May 2007
    Location
    Zimbra
    Posts
    1,285
    Rep Power
    10

    Default

    you bet .
    Quanah Gibson-Mount
    Server Architect
    Zimbra, Inc
    --------------------
    Zimbra :: the leader in open source messaging and collaboration

  10. #20
    Join Date
    Jun 2013
    Location
    Vietnam
    Posts
    28
    Rep Power
    2

    Default

    Dear,

    I got a lot of "CRITICAL! LDAP primary MDB database is 90% full". I have read long topic about the actual size of mdb database and this is my output:
    [zimbra@mail ~]$ ls /opt/zimbra/data/ldap/mdb/db/ -la
    total 13186400
    drwxr-xr-x 2 zimbra zimbra 4096 Mar 20 02:20 .
    drwxr-xr-x 3 zimbra zimbra 4096 Jul 15 2013 ..
    -rw------- 1 zimbra zimbra 13502853120 Mar 20 09:45 data.mdb
    -rw------- 1 zimbra zimbra 8192 Mar 20 09:57 lock.mdb
    [zimbra@mail ~]$ du -c -h /opt/zimbra/data/ldap/mdb/db/
    13G /opt/zimbra/data/ldap/mdb/db/
    13G total
    [zimbra@mail ~]$ zmlocalconfig -s ldap_db_maxsize
    ldap_db_maxsize = 13502853120
    My server has about 120 mailboxes, 10 domains. Before this warning, I have carried out partition moving.

    How can I fix this? By adjust the ldap_db_maxsize to 80Gb?

    Thank a lot.

Similar Threads

  1. Strange data store size increase on migration
    By zwvpadmin in forum Administrators
    Replies: 11
    Last Post: 01-22-2012, 10:16 AM
  2. Strange data store size increase on migration
    By zwvpadmin in forum Migration
    Replies: 0
    Last Post: 01-14-2012, 07:38 PM
  3. DailyMail Report with messages with no data size
    By Kidoucorp in forum Administrators
    Replies: 1
    Last Post: 09-01-2011, 01:03 AM
  4. ZDesktop data directory is 10GB in size!
    By PeterSteele in forum General Questions
    Replies: 5
    Last Post: 02-20-2009, 06:38 PM
  5. 4.5 to 5.0 OSS upgrade on Ubuntu kills all LDAP data
    By RoadRunnr in forum Installation
    Replies: 8
    Last Post: 12-30-2007, 07:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •