1. 备份mailbox
su – zimbra
mkdir /opt/zimbra/backup/store
cp -r /opt/zimbra/store/* /opt/zimbra/backup/store/
2. 备份mysql
su - zimbra
/opt/zimbra/mysql/bin/mysqldump -uroot –p$mysql_pswd --socket=/opt/zimbra/db/mysql.sock --all-databases > /opt/zimbra/backup/dump.2011.sql
3. 备份ldap
su - zimbra
/opt/zimbra/libexec/zmslapcat /opt/zimbra/backup/
会在/opt/zimbra/backup/目录下生成 后面接日期的文件 ldap.bak..$data
恢复
1. 恢复 mailbox
su – zimbra
mkdir /opt/zimbra/backup/store.old
mv /opt/zimbra/store/* /opt/zimbra/backup/store.old/
cp -r /opt/zimbra/backup/store/* /opt/zimbra/store
2. 恢复 mysql
mysql -uroot -p$mysql_pswd < /opt/zimbra/backup/dump.2011.sql
3 恢复 ldap
mkdir /opt/zimbra/backup/ldap.db.old
mv /opt/zimbra/data/ldap/hdb/db/* /opt/zimbra/backup/ldap.db.old/
/opt/zimbra/openldap/sbin/slapadd -q -b "" -F /opt/zimbra/data/ldap/config -cv –l /opt/zimbra/backup/ ldap.bak..$data
重启zimbra: zmcontrol restart