Tag Archives: zimbra restore

Zimbra restore

INSTALLATION

1. Clean install Centos 5.5 (minimal)

# my anaconda-ks.cfg
# Kickstart file automatically generated by anaconda.
install
cdrom
lang en_US.UTF-8
keyboard slovene
network --device eth0 --bootproto static --ip *** --netmask *** --gateway *** --nameserver ***,*** --hostname host.domain.com
rootpw --iscrypted $**********************************
firewall --enabled --port=22:tcp
authconfig --enableshadow --enablemd5
selinux --enforcing
timezone --utc Europe/***************
bootloader --location=mbr --driveorder=hda
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
#clearpart --linux --drives=hda
#part /boot --fstype ext3 --size=512
#part swap --size=2200
#part pv.16 --size=100 --grow
#volgroup zimbra --pesize=32768 pv.16
#logvol /opt --fstype ext3 --name=opt --vgname=**** --size=32928
#logvol /var --fstype ext3 --name=var --vgname=**** --size=5184
#logvol /usr --fstype ext3 --name=usr --vgname=**** --size=5184
#logvol / --fstype ext3 --name=root --vgname=**** --size=5184
%packages
@base
@core
@editors
@text-internet
keyutils
trousers
fipscheck
device-mapper-multipath
-vconfig
-nano
-sendmail
-rp-pppoe
-telnet
-bluez-utils
-logwatch

2. installation of required packages

# yum install -y gmp sysstat compat-libstdc++-33

2.1 Removal of unwanted packages (sendmail,exim,—)

3. Instalattion of Zimbra (6.0.6.***)

3.1 download the same version of Zimbra as backup version with wget

wget ...

3.2 installation of Zimbra

# tar xvzf zcs-***.tgz
# cd zcs***
# ./install.sh -s --platform-override

(with -s we install only packages and add user without other configuration)
4. Restore backup with rsync (I have backup only /opt/zimbra directory with rsync)

# rsync -avr from backup to  /opt/zimbra

5. Repair permission

# chown -R zimbra.zimbra /opt/zimbra
# /opt/zimbra/libexec/zmfixperms

8. start zimbra (zmcontrol start as zimbra user)

[zimbra@host ~]$ zmcontrol start

FIXING ERRORS

Error 1

Starting spell…Failed.

Starting apache…httpd: Syntax error on line 232 of /opt/zimbra/conf/httpd.conf: Cannot load /opt/zimbra/httpd/modules/libphp5.so into server: /opt/zimbra/httpd/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied

failed.

# ls -la –context /opt/zimbra/httpd-2.2.14/modules/libphp5.so

-rwxr-xr-x  root root system_u:object_r:usr_t          /opt/zimbra/httpd-2.2.14/modules/libphp5.so

Solution 1

# chcon -t texrel_shlib_t /opt/zimbra/httpd-2.2.14/modules/libphp5.so

Error 2 –  logswatch daemon doesnt start

[zimbra@host log]$ tail -f zmlogswatch.out

Error opening /var/log/zimbra-stats.log: No such file or directory at /opt/zimbra/data/tmp/.swatch_script.6717 line 92

Solution 2

[root@host ~]# touch /var/log/zimbra-stats.log
[root@host ~]# chown zimbra.zimbra /var/log/zimbra-stats.log

Error 3

Server error encountered

Message: system failure: exception during auth {RemoteManager: mail.spanger.org->zimbra@mail.spanger.org:22} Error code: service.FAILURE Method: GetCertRequest Details:soap:Receiver

Solution 3

a)

# vim /etc/ssh/sshd_config  ---> Port 22
# /etc/init.d/sshd restart

b) Be sure zimbra’s ssh port is set to 22

Code:

[zimbra@host ~] zmprov ms server.domain.com zimbraRemoteManagementPort 22

c) Generate new ssh keys

Code:

[zimbra@host ~] cd /opt/zimbra/bin/ && ./zmsshkeygen

d) Deploy the keys

Code:

[zimbra@host ~] ./zmupdateauthkeys

Error 4

Server error encountered

Message: system failure: server host.domain.com zimbraRemoteManagementPrivateKeyPath (/opt/zimbra/.ssh/zimbra_identity) does not exist Error code: service.FAILURE Method: GetCertRequest Details:soap:Receiver

Solution 4

cd; echo '' > .ssh/authorized_keys; cat .ssh/zimbra_identity.pub > .ssh/authorized_keys; chmod 700 .ssh; chmod 600 .ssh/authorized_keys;

or

[zimbra@host ~]$ touch .ssh/zimbra_identity

Error 5

error in admin webinterface https://host.domain.com:7071/zimbraAdmin/ (Mail Queue)

Error code: service.FAILURE Method: GetMailQueueInfoRequest Details:soap:Receiver

Solution 5

add user to sshd configuration file under AllowUsers

# vim /etc/ssh/sshd_config
AllowUsers Zimbra