Results 1 to 6 of 6

Thread: KyaPanel offers Zimbra Backup and Restore tool

  1. #1
    Join Date
    Jan 2008
    Location
    Curitiba - PR - Brazil
    Posts
    28
    Rep Power
    7

    Default KyaPanel offers Zimbra Backup and Restore tool

    Interesting announcement from KyaPanel:

    Zimbra Backup and Restore tool
    02/03/2009

    This is the greatest new in Version 2.2~1: now KyaPanel has an exclusive tool to make backup and restore in servers with Zimbra. Like all KyaPanel's tools this one goes ahead from the regular tools. This one allow you to restore a single message for a user. How great is this?. Unfortunate not all is perfect. Zimbra still ask for a mailbox restart and this is boring but it's the way Zimbra is.

    The tool name is kpzmbkp and it's a beta version, so use it with caution and report us any problems you find to help us to make it better.

    In the other hand this version get a lot of bug fixes in many controls like attachment and recipient limit. Take a look on ChangeLog.

    Enjoy!

  2. #2
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    A single message for a user can be injected back into Zimbra using zmlmtpinject.

  3. #3
    Join Date
    Jan 2008
    Location
    Curitiba - PR - Brazil
    Posts
    28
    Rep Power
    7

    Default

    In my understanding KyaPanel allows you to restore a single message from a backup archive and then you can use zmlmtpinject to inject the message back to the user mailbox.

  4. #4
    Join Date
    Jul 2007
    Location
    Baltimore
    Posts
    1,649
    Rep Power
    11

    Default

    what does

    Zimbra still ask for a mailbox restart and this is boring but it's the way Zimbra is.
    mean?

  5. #5
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    Speaking of using some of the tools like zmlmtpinject or zmmailbox addMessage, some snips from a discussion internally a few months back. Keep in mind we are still very impressed with how well they integrate thus far.

    This is some pretty dangerous stuff. I don't think they're using imapsync, they appear to be using fetchmail to write the messages to disk in maildir format, and then inserting them with direct calls to mysql to modify the mail_item tables. (No, I am not kidding). c2z.sh is the insert, zp2zmessages.sh is the fetchmail wrapper.

    No automated detection of the zimbra install dir, and no use of zmlocalconfig:
    SQL_USER_PW=`grep -A1 zimbra_mysql_password $ZIMBRAHOME/conf/localconfig.xml | tail -n1 | cut -d\> -f2 | cut -d\< -f1`
    Direct invocation of ldap to set cos options, no quoting of passwords for special characters:
    # Firts thig to do is change the zimbraAllowAnyFromAddress attribute from false to true in cn=default,cn=cos,cn=zimbra
    # This is what we has to do to Zimbra show the From field on its webmail.
    Z_LDAP_URL=`grep -A1 ldap_master_url $ZIMBRAHOME/conf/localconfig.xml | tail -n1 | cut -d\> -f2 | cut -d\< -f1`
    Z_LDAP_DN="cn=config"
    Z_LDAP_PW=`grep -A1 zimbra_ldap_password $ZIMBRAHOME/conf/localconfig.xml | tail -n1 | cut -d\> -f2 | cut -d\< -f1`
    LDAP_FILE="/tmp/zimbra_zimbraAllowAnyFromAddress"
    echo "dn: cn=default,cn=cos,cn=zimbra" > $LDAP_FILE
    echo "replace: zimbraAllowAnyFromAddress" >> $LDAP_FILE
    echo "zimbraAllowAnyFromAddress: TRUE" >> $LDAP_FILE
    $ZIMBRAHOME/openldap/bin/ldapmodify -H $Z_LDAP_URL -D $Z_LDAP_DN -w $Z_LDAP_PW -x -f $LDAP_FILE > /dev/null 2>&1
    rm -f $LDAP_FILE
    There's this little gem of a folder creation section:
    echo -e "\tAdding folder *** $F_FOLDER ****"
    echo ""
    EC=""
    EC2=""
    ${MYSQL_COMM} $MAILBOX_NAME -e"insert into mail_item values($F_MAILBOX_ID,$F_ID,$F_TYPE,$F_PARENT_ID,$F _FOLDER_ID,$F_INDEX_ID,$F_IMAP_ID,$F_DATE,$F_SIZE, $F_VOLUME_ID,$F_BLOB_DIGEST,$F_UNREAD,$F_FLAGS,$F_ TAGS,$F_SENDER,'$F_SUBJECT','$F_NAME','$F_METADATA ','$F_MOD_METADATA',$F_CHANGE_DATE,$F_MOD_CONTENT) ;"
    I=`expr $I + 1`
    The message creation, much later:
    #echo -e "\tAdding message $EACH_MESSAGE"
    ${MYSQL_COMM} $MAILBOX_NAME -e"insert into mail_item values($M_MAILBOX_ID,$M_ID,$M_TYPE,$M_PARENT_ID,$M _FOLDER_ID,$M_INDEX_ID,$M_IMAP_ID,$M_DATE,$M_SIZE, $M_VOLUME_ID,'$M_BLOB_DIGEST',$M_UNREAD,$M_FLAGS,$ M_TAGS,'$M_SENDER','$M_SUBJECT','$M_NAME','$M_META DATA','$M_MOD_METADATA',$M_CHANGE_DATE,$M_MOD_CONT ENT);"
    M_DESTINATION=`${MYSQL_COMM} zimbra -e"select path from volume where id = '1';"`
    Last edited by mmorse; 02-04-2009 at 12:48 PM.

  6. #6
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    It's an extremely useful tool, just to 'disclaimer': Zimbra can play well with others through APIs. That's how cross-interactions for webservices/applications best. Hacking mysql and localconfig could result in problems down the road and it would be negligent of us not to warn. Hopefully the Kya people will take that feedback and use some of the safer methods in the future.

    ie: There's a safer way to communicate. Zimbra can be managed by others - we're based some excellent open source third parties - and that's the point of stuff like this after all. It's up to the admins to take the chance of course; simply making the position on "what's network edition supported" clear.

    Started: KyaPanel with Zimbra - Zimbra :: Wiki
    Last edited by mmorse; 02-04-2009 at 01:01 PM.

Similar Threads

  1. Per User Backup for FOSS edition
    By fdsadmin in forum Developers
    Replies: 33
    Last Post: 03-14-2013, 10:16 AM
  2. zmBackMind : Backup and Restore Zimbra OSE
    By julienVM in forum Administrators
    Replies: 27
    Last Post: 02-10-2009, 01:05 PM
  3. Zimbra Integration with Exchange Server 2003/2007
    By avelanju in forum Installation
    Replies: 2
    Last Post: 07-09-2008, 06:10 AM
  4. [SOLVED] Backup-erator help
    By whiskey6 in forum Installation
    Replies: 19
    Last Post: 01-08-2008, 10:56 AM
  5. 3 testing: LDAP: 389 Failed when restore zimbra
    By victorLeong in forum Administrators
    Replies: 15
    Last Post: 05-24-2007, 07:45 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
  •