Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 1.28 KB

zimbra-backup.md

File metadata and controls

58 lines (38 loc) · 1.28 KB

zimbra backup

from zimbra container prepare a folder

mkdir /backup
chmod 700 /backup
chown zimbra.zimbra /backup

then switch to zimbra user

su - zimbra

backup mailbox

zmmailbox -z -v -m user@domain getRestURL "//?fmt=tgz" > /backup/user.tgz

backup specific date

  • 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

restore mailbox

zmmailbox -z -v -m user@domain postRestURL "//?fmt=tgz" /backup/user.tgz

troubleshoot

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

reference