from zimbra container prepare a folder
mkdir /backup
chmod 700 /backup
chown zimbra.zimbra /backup
then switch to zimbra user
su - zimbra
zmmailbox -z -v -m user@domain getRestURL "//?fmt=tgz" > /backup/user.tgz
- see options query of zmmailbox getRestURL, for example
zmmailbox -z -v -m user@domain getRestURL --startTime 'YYYY/MM/DD' '//?fmt=tgz' > /backup/user.tgz
- if running a parallel backuped zimbra container be aware to override DNS info through /etc/hosts with ip of container i.e. ( replace mailname.fqdn with your and ip with container ip )
172.17.0.2 mailname.fqdn
and use -u "https://IPADDR"
argument on zmmailbox to specify url replacing IPADDR with the one of container
zmmailbox -z -v -m user@domain postRestURL "//?fmt=tgz" /backup/user.tgz
connection refused
: it may happen if you ran from a parallel backup container then need to run
zmmcontrol start
note: may need to press ctrl+c on ldap starting to bypass