Results 1 to 9 of 9

Thread: Restoring mailbox using zmmailbox PostResURL

  1. #1
    sevilla is offline Senior Member
    Join Date
    Dec 2008
    Posts
    68
    Rep Power
    6

    Default Restoring mailbox using zmmailbox PostResURL

    I made a backup of a mailbox using:
    mmailbox -z -m user@domain.com getRestURL -o backup.tgz “//?fmt=tgz”

    then, created a test accound on the same domain and tried to restore the backup file.:

    zmmailbox -z -m test@domain.com postRestURL "//?fmt=tgz&resolve=reset" backup.tgz


    but im getting this error:

    ERROR: service.FAILURE (system failure: POST failed, status=302 Found)

    Im using: zcs-7.1.1_GA_3196.UBUNTU8_64 Community


    thanks!

  2. #2
    lytledd is offline Elite Member
    Join Date
    Dec 2009
    Location
    Michigan
    Posts
    448
    Rep Power
    5

    Default

    zmmailbox -z -m test@domain.com postRestURL "//?fmt=tgz&resolve=reset" backup.tgz
    Specify the complete path to the backup.tgz

    Code:
    zmmailbox -z -m $NAME postRestURL '//?fmt=tgz&resolve=reset' $DIR/$NAME.tgz
    Doug
    Ben Franklin quote:

    "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."

  3. #3
    sevilla is offline Senior Member
    Join Date
    Dec 2008
    Posts
    68
    Rep Power
    6

    Default

    i specified the absolute path and got the same error.

    the name of the account need to be the same of the file backed up? $NAME

  4. #4
    lytledd is offline Elite Member
    Join Date
    Dec 2009
    Location
    Michigan
    Posts
    448
    Rep Power
    5

    Default

    No, not that I'm aware of. Try using the Zimbra web portal to import it and see if it works there.

    Doug
    Ben Franklin quote:

    "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."

  5. #5
    sevilla is offline Senior Member
    Join Date
    Dec 2008
    Posts
    68
    Rep Power
    6

    Default

    importing from web Works!

  6. #6
    michelp's Avatar
    michelp is offline Intermediate Member
    Join Date
    Jan 2010
    Posts
    16
    Rep Power
    5

    Default

    Hello,

    I've got a similar issue :
    I'm trying to restore a 3.6 GB backup on CLI, and it doesnt work.

    Here is what I tried :

    /opt/zimbra/bin/zmmailbox -z --url https://MY.SERVER.COM:7071 -m ACCOUNT@DOMAIN.COM postRestURL "//?fmt=tgz&resolve=skip" /tmp/Backup-2011-10-17-112018.tgz
    Replacing :
    - "MY.SERVER.COM" with FQDN of the zimbra server
    - "ACCOUNT@DOMAIN.COM" with target customer email account

    And here hese the result (returned after a few seconds) :

    ERROR: service.FAILURE (system failure: POST failed, status=302 Found)
    Same things occure when removing "--url https://MY.SERVER.COM:7071" :

    /opt/zimbra/bin/zmmailbox -z -m ACCOUNT@DOMAIN.COM postRestURL "//?fmt=tgz&resolve=skip" /tmp/Backup-2011-10-17-112018.tgz
    Is this a problem with my config only accepting HTTPS ?
    or because of the 3.6GB size of the backup ?
    I don't think I can post a 3.6GB file on the web portal...

  7. #7
    michelp's Avatar
    michelp is offline Intermediate Member
    Join Date
    Jan 2010
    Posts
    16
    Rep Power
    5

    Default

    And here is the "verbose" answer, with "-v" switch :

    ERROR: service.FAILURE (system failure: POST failed, status=302 Found)
    com.zimbra.common.service.ServiceException: system failure: POST failed, status=302 Found
    ExceptionId:main:1319189836614:db6623fa714bb918
    Code:service.FAILURE
    at com.zimbra.common.service.ServiceException.FAILURE (ServiceException.java:248)
    at com.zimbra.cs.zclient.ZMailbox.postRESTResource(ZM ailbox.java:2496)
    at com.zimbra.cs.zclient.ZMailboxUtil.doPostRestURL(Z MailboxUtil.java:2798)
    at com.zimbra.cs.zclient.ZMailboxUtil.execute(ZMailbo xUtil.java:1141)
    at com.zimbra.cs.zclient.ZMailboxUtil.main(ZMailboxUt il.java:2679)
    [EDIT]

    The same error appear when importing on CLI a small export of 5 MB...
    (this same 5MB export can be imported succesfully via the webmail)

    It's a Zimbra Network Edition : Zimbra 7.1.2_GA_3268 (version 20110804120420)

    Any help would be greatly appreciated.
    Last edited by michelp; 10-21-2011 at 08:33 AM.

  8. #8
    michelp's Avatar
    michelp is offline Intermediate Member
    Join Date
    Jan 2010
    Posts
    16
    Rep Power
    5

    Default postRestURL returning "system failure: POST failed, status=302 Found"

    I've found a workaround to make it work :

    The issue I encountered comes from a special config I use :
    Code:
    zmtlsctl redirect
    (i.e. webmail http force redirect to httpS, only httpS allowed)
    instead of the default Zimbra config :
    Code:
    zmtlsctl both
    (i.e. both http and httpS fully works for webmail)

    With "zmtlsctl redirect" used, a "/opt/zimbra/bin/zmmailbox -z -m user@host postRestURL (...)" command won't work and returns this weird error :
    Code:
    ERROR: service.FAILURE (system failure: POST failed, status=302 Found)
    So the workaround consist of temporarly allowing http with "zmtlsctl both" :
    Code:
    su - zimbra
    zmtlsctl both
    zmmailboxdctl restart
    ...then, importing mailbox :
    Code:
    /opt/zimbra/bin/zmmailbox -z -m user@host postRestURL (...)
    ... then finally getting back to my previous config :
    Code:
    su - zimbra
    zmtlsctl redirect
    zmmailboxdctl restart
    Maybe there is another / better way of doing it,
    but this one works !

  9. #9
    michelp's Avatar
    michelp is offline Intermediate Member
    Join Date
    Jan 2010
    Posts
    16
    Rep Power
    5

    Default A more simple way of doing it

    In fact, when using :
    Code:
    zmtlsctl redirect
    there is no need to reconfigure Zimbra to correctly import mailbox via CLI.

    Only thing to use is :
    adding "-u" param with correct httpS host-path,
    and putting "-u" AFTER "postRestURL" (not before as I use to do)
    Example :
    Code:
    /opt/zimbra/bin/zmmailbox -z -m user@host postRestURL -u https://HOST "//?fmt=tgz&resolve=skip" /tmp/export.tgz

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 210
    Last Post: 01-17-2012, 01:19 AM
  2. [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
  3. server dropped connection
    By ferra in forum Installation
    Replies: 20
    Last Post: 10-06-2008, 04:32 PM
  4. can't you help me
    By iwan siahaan in forum Administrators
    Replies: 6
    Last Post: 12-17-2007, 06:53 PM
  5. Restoring one mailbox
    By kibo in forum Administrators
    Replies: 9
    Last Post: 02-28-2007, 10:31 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
  •