首先说明一下大概的思路,对于zimbra邮件系统,我们主要备份好邮箱(mailbox),用户的帐号,和数据库就可以了。其实就是:
下面是具体步骤:
备份
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
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
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: