Export Zimbra mailbox

To export the mailbox for user@acme.com as a zip file use this command:

/opt/zimbra/bin/zmmailbox -z -m user@acme.com getRestURL \
‘//?fmt=zip&query=is:anywhere’ > user_at_acme_com.zip

Here is the same as a tgz file:

/opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL \
“//?fmt=tgz” > /tmp/account.tgz

And here’s a restore of the tgz file:

/opt/zimbra/bin/zmmailbox -z -m user@domain.com postRestURL \
“//?fmt=tgz&resolve=reset” /tmp/account.tgz

  • Rodrigo

    Ok, it works perfectly!
    Thanks!

  • http://www.whoismark.com john brightman

    HI
    looks very interesting!
    bookmarked your blog.
    john brightman

  • http://www.rs2acc.com runescape accounts

    Thankiossk Cool!

  • http://www.rs2box.com runescape accounts

    Thankiossk Cool!

  • http://www.rs2box.com runescape accounts

    Thankiossk Cool!

  • Istvan

    have you tried zip restore?
    does it work for you?

  • Xtrenge

    this is for 1 user.. but what about couple (100′s) more is there some script or something like this? thanks :)

  • Monk

    Xtrange, if you want to use it for all users simply run this:
    /opt/zimbra/bin/zmprov -l gaa domain.org > /opt/zimbra/backup/users.list

    for mbox in `cat /opt/zimbra/backup/users.list` ;
    do
    /opt/zimbra/bin/zmmailbox -z -m $mbox getRestURL ‘//?fmt=zip&query=is:anywhere’ > /opt/zimbra/backup/domain/$mbox_`date +’%Y%m%d_%H%M%S’`.zip
    done

blog comments powered by Disqus