Results 1 to 5 of 5

Thread: zmmailbox fmt=zip vs fmt=tgz

  1. #1
    LHammonds's Avatar
    LHammonds is offline Special Member
    Join Date
    Sep 2011
    Location
    Texas
    Posts
    150
    Rep Power
    3

    Default zmmailbox fmt=zip vs fmt=tgz

    I've been doing some testing to handle individual mailbox backup / restore on an Ubuntu 10.04.3 LTS with Zimbra 7.1.3 OSE.

    There seems to be content differences when specifying zip verses tgz yet there is no documentation that these formats access different content.

    Reference: REST API

    For example:

    Code:
    /opt/zimbra/bin/zmmailbox -z -m user@mydomain.com getRestURL "?fmt=zip" > /tmp/archive.zip
    The above creates a file with the following folders (there are single files in the sub-folders but no files in the root):

    archive.zip = 77 kb, (7 folders, 68 files)
    Code:
    Briefcase/
    Contacts/
    Deleted Messages/
    Inbox/
    Sent/
    Sent Messages/
    Code:
    /opt/zimbra/bin/zmmailbox -z -m user@mydomain.com getRestURL "?fmt=tgz" > /tmp/archive.tgz
    The above creates a file with the following folders and files:

    archive.tgz = 77 kb, (10 folders, 179 files)
    Code:
    Briefcase/
    Calendar
    Contacts/
    Conversations
    Deleted Messages/
    Emailed Contacts
    Inbox/
    Sent/
    Sent Messages/
    Tasks
    00000000011-ROOT.meta
    00000000001-USER_ROOT.meta
    00000000016-Briefcase.meta
    00000000010-Calandar.meta
    etc.
    I then test what data is actually restored by purging all content in all areas of the account and then issue the following command:

    Code:
    /opt/zimbra/bin/zmmailbox -z -m user@mydomain.com postRestURL "?fmt=zip" /tmp/archive.zip
    When I check the account using web mail, I see the inbox messages, sent items, contacts, emailed contacts. Missing Calendar items, tasks and briefcase docs!

    I then purge all content in all areas of the account and then issue the following command:

    Code:
    /opt/zimbra/bin/zmmailbox -z -m user@mydomain.com postRestURL "?fmt=tgz" /tmp/archive.tgz
    When I check the account using web mail, I see the inbox messages, sent items, contacts, emailed contacts, calendar items, tasks and briefcase files.

    Is this a bug or am I misunderstanding how this works?

    LHammonds

  2. #2
    ccelis5215 is offline Elite Member
    Join Date
    Jun 2011
    Location
    Caracas Venezuela
    Posts
    443
    Rep Power
    3

    Default

    Well, the diferences between zip and tgz using zmmailbox are mentioned in » Zimbra :: Blog

    Not a Zimbra Admin? Users can get the same zip/tar formatter on REST URL’s by visiting:
    http:// server.domain.com/home/user?fmt=zip&query=is:anywhere

    The zip format has been around for a long time, but doesn’t contain account & item metadata like the tar formatter automatically does:
    http:// server.domain.com/home/user/?fmt=tgz
    So, you can use tgz with no problem.

    Regards.

  3. #3
    LHammonds's Avatar
    LHammonds is offline Special Member
    Join Date
    Sep 2011
    Location
    Texas
    Posts
    150
    Rep Power
    3

    Default

    Thanks for the additional link I didn't have before.

    Quote Originally Posted by ccelis5215 View Post
    Well, the diferences between zip and tgz using zmmailbox are mentioned in » Zimbra :: Blog
    I already determined what the differences are by trial and error.

    The problem is that the existing documentation does not make the distinction that using zip will result in an incomplete backup. They contradict themselves even on the "blog" article you linked to.

    Example #1 (from the ZCS to ZCS Migration blog):
    Users can get the same zip/tar formatter on REST URL
    The zip format has been around for a long time, but doesn’t contain account & item metadata like the tar formatter automatically does
    Example #2 (from the API Export Mailbox)

    Retrieve the entire mailbox for "john.doe" as ZIP format:
    Retrieve the entire mailbox for "john.doe" as Compressed TAR format:
    Quote Originally Posted by ccelis5215 View Post
    So, you can use tgz with no problem.
    Through trial and error (thank God I tested it), I ended up using tgz option.

    What I do not understand is why the zip option exists and does not actually retrieve the "entire mailbox" like the tgz option does. I cannot find anything that explains "why" the zip option is a subset of tgz or why it is even being mentioned at all as an option when it doesn't actually export the entire mailbox...only the inbox. Also note that "Calendar" and "Tasks" and "Briefcase" are not "account-level information", those are part of the mailbox which I would think should be included in the zip option but cannot be included, even when using the "in:inbox" or "under:inbox" or "in:anywhere" which again is only related to the inbox folder.

    LHammonds

  4. #4
    ewilen's Avatar
    ewilen is offline Moderator
    Join Date
    Jun 2008
    Location
    Berkeley, CA
    Posts
    1,474
    Rep Power
    8

    Default

    I think you should open a bug about this in bugzilla.zimbra.com. This will bring the issue to the attention of the developers and will either get you a fix, an explanation (though it may be terse),or an update of the documentation.

    Please post the bug number here.

  5. #5
    LHammonds's Avatar
    LHammonds is offline Special Member
    Join Date
    Sep 2011
    Location
    Texas
    Posts
    150
    Rep Power
    3

    Default

    Quote Originally Posted by ewilen View Post
    I think you should open a bug about this in bugzilla.zimbra.com. This will bring the issue to the attention of the developers and will either get you a fix, an explanation (though it may be terse),or an update of the documentation.

    Please post the bug number here.
    I am working around this problem by avoiding the zip format and thus not interested if they fix it or not.

    However, in the interest of anyone else thinking about using it (without testing), I have created bug report 67165.

    EDIT: They looked into the problem and found that you have to include a meta data setting for zip to get the same data tgz does. It is listed as a tech documentation problem. Example: ?fmt=zip&meta=1 needs to be used to be the same as ?fmt=tgz (NOTE: I have not tested this though...I would be leary that setting a meta data value would also include calendars, briefcase items, etc. which are not just meta data)

    LHammonds
    Last edited by LHammonds; 05-03-2012 at 09:39 AM.
    Type su - zimbra -c "zmcontrol -v" to get your version and copy that into your profile (more info here)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] New Mailbox Filter to users from zmmailbox
    By Atauhalpa Pierrie Bulling in forum Administrators
    Replies: 4
    Last Post: 02-05-2010, 03:29 PM
  2. Replies: 1
    Last Post: 03-24-2008, 02:35 PM
  3. zmmailbox and spaces in folder names
    By badrian in forum Administrators
    Replies: 2
    Last Post: 06-28-2007, 11:26 AM
  4. zmmailbox command help
    By markpr in forum Administrators
    Replies: 2
    Last Post: 03-19-2007, 09:13 AM
  5. zmmailbox createfolder command options
    By shideg in forum Migration
    Replies: 3
    Last Post: 12-12-2006, 08:25 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
  •