{"id":501,"date":"2010-05-20T21:21:21","date_gmt":"2010-05-20T20:21:21","guid":{"rendered":"http:\/\/blog.spanger.org\/?p=501"},"modified":"2011-02-05T22:25:03","modified_gmt":"2011-02-05T21:25:03","slug":"zimbra-restore-my-way","status":"publish","type":"post","link":"https:\/\/blog.spanger.org\/?p=501","title":{"rendered":"Zimbra restore"},"content":{"rendered":"<p><strong><em>INSTALLATION<\/em><\/strong><\/p>\n<p>1. Clean install Centos 5.5 (minimal)<\/p>\n<pre><code># my anaconda-ks.cfg\r\n# Kickstart file automatically generated by anaconda.\r\ninstall\r\ncdrom\r\nlang en_US.UTF-8\r\nkeyboard slovene\r\nnetwork --device eth0 --bootproto static --ip *** --netmask *** --gateway *** --nameserver ***,*** --hostname host.domain.com\r\nrootpw --iscrypted $**********************************\r\nfirewall --enabled --port=22:tcp\r\nauthconfig --enableshadow --enablemd5\r\nselinux --enforcing\r\ntimezone --utc Europe\/***************\r\nbootloader --location=mbr --driveorder=hda\r\n# The following is the partition information you requested\r\n# Note that any partitions you deleted are not expressed\r\n# here so unless you clear all partitions first, this is\r\n# not guaranteed to work\r\n#clearpart --linux --drives=hda\r\n#part \/boot --fstype ext3 --size=512\r\n#part swap --size=2200\r\n#part pv.16 --size=100 --grow\r\n#volgroup zimbra --pesize=32768 pv.16\r\n#logvol \/opt --fstype ext3 --name=opt --vgname=**** --size=32928\r\n#logvol \/var --fstype ext3 --name=var --vgname=**** --size=5184\r\n#logvol \/usr --fstype ext3 --name=usr --vgname=**** --size=5184\r\n#logvol \/ --fstype ext3 --name=root --vgname=**** --size=5184\r\n%packages\r\n@base\r\n@core\r\n@editors\r\n@text-internet\r\nkeyutils\r\ntrousers\r\nfipscheck\r\ndevice-mapper-multipath\r\n-vconfig\r\n-nano\r\n-sendmail\r\n-rp-pppoe\r\n-telnet\r\n-bluez-utils\r\n-logwatch<\/code><\/pre>\n<p>2. installation of required packages<\/p>\n<pre><code># yum install -y gmp sysstat compat-libstdc++-33<\/code><\/pre>\n<p>2.1 Removal of unwanted packages (sendmail,exim,&#8212;)<\/p>\n<p>3. Instalattion of\u00a0Zimbra (6.0.6.***)<\/p>\n<p>3.1 download the same version of Zimbra as backup version with wget<\/p>\n<pre><code>wget ...<\/code><\/pre>\n<p>3.2 installation of Zimbra<\/p>\n<pre><code># tar xvzf zcs-***.tgz\r\n# cd zcs***\r\n# .\/install.sh -s --platform-override<\/code><\/pre>\n<p> (with -s we install only packages and add user without other configuration)<br \/>\n4. Restore backup with rsync (I have backup only \/opt\/zimbra directory with rsync)<\/p>\n<pre><code># rsync -avr\u00a0from\u00a0backup to\u00a0\u00a0\/opt\/zimbra<\/code><\/pre>\n<p>5. Repair permission<\/p>\n<pre><code># chown -R zimbra.zimbra \/opt\/zimbra\r\n# \/opt\/zimbra\/libexec\/zmfixperms<\/code><\/pre>\n<p>8. start zimbra (zmcontrol start as zimbra user)<\/p>\n<pre><code>[zimbra@host ~]$ zmcontrol start<\/code><\/pre>\n<p><em><strong>FIXING ERRORS<\/strong><\/em><\/p>\n<p><strong>Error 1<\/strong><\/p>\n<p>Starting spell&#8230;Failed.<\/p>\n<p>Starting apache&#8230;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<\/p>\n<p>failed.<\/p>\n<p># ls -la &#8211;context \/opt\/zimbra\/httpd-2.2.14\/modules\/libphp5.so<\/p>\n<p>-rwxr-xr-x\u00a0 root root system_u:object_r:usr_t\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/opt\/zimbra\/httpd-2.2.14\/modules\/libphp5.so<\/p>\n<p><span style=\"color: #000000;\"><strong>Solution 1<\/strong><\/span><\/p>\n<pre><code># chcon -t texrel_shlib_t \/opt\/zimbra\/httpd-2.2.14\/modules\/libphp5.so<\/code><\/pre>\n<p><strong>Error 2<\/strong> &#8211; \u00a0logswatch daemon doesnt start<\/p>\n<pre><code>[zimbra@host log]$ tail -f zmlogswatch.out<\/code><\/pre>\n<p>Error opening \/var\/log\/zimbra-stats.log: No such file or directory at \/opt\/zimbra\/data\/tmp\/.swatch_script.6717 line 92<\/p>\n<p><strong>Solution 2<\/strong><\/p>\n<pre><code>[root@host ~]# touch \/var\/log\/zimbra-stats.log\r\n[root@host ~]# chown zimbra.zimbra \/var\/log\/zimbra-stats.log<\/code><\/pre>\n<p><strong>Error 3<\/strong><\/p>\n<p>Server error encountered<\/p>\n<p>Message: system failure: exception during auth {RemoteManager: mail.spanger.org-&gt;zimbra@mail.spanger.org:22} Error code: service.FAILURE Method: GetCertRequest Details:soap:Receiver<\/p>\n<p><strong>Solution 3<\/strong><\/p>\n<p>a)<\/p>\n<pre><code># vim \/etc\/ssh\/sshd_config \u00a0---&gt; Port 22\r\n# \/etc\/init.d\/sshd restart<\/code><\/pre>\n<p>b) Be sure zimbra&#8217;s ssh port is set to 22<\/p>\n<p>Code:<\/p>\n<pre><code>[zimbra@host ~]\u00a0zmprov ms server.domain.com zimbraRemoteManagementPort 22<\/code><\/pre>\n<p>c) Generate new ssh keys<\/p>\n<p>Code:<\/p>\n<pre><code>[zimbra@host ~] cd \/opt\/zimbra\/bin\/ && .\/zmsshkeygen<\/code><\/pre>\n<p>d) Deploy the keys<\/p>\n<p>Code:<\/p>\n<pre><code>[zimbra@host ~]\u00a0.\/zmupdateauthkeys<\/code><\/pre>\n<p><strong>Error 4<\/strong><\/p>\n<p>Server error encountered<\/p>\n<pre><code>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\r\n<\/code><\/pre>\n<p><strong>Solution 4<\/strong><\/p>\n<pre><code>cd; echo '' &gt; .ssh\/authorized_keys; cat .ssh\/zimbra_identity.pub &gt; .ssh\/authorized_keys; chmod 700 .ssh; chmod 600 .ssh\/authorized_keys;<\/code><\/pre>\n<p>or <\/p>\n<pre><code>[zimbra@host ~]$ touch .ssh\/zimbra_identity<\/code><\/pre>\n<p><strong>Error 5<\/strong><\/p>\n<p>error in admin webinterface https:\/\/host.domain.com:7071\/zimbraAdmin\/ (Mail Queue)<\/p>\n<pre><code>Error code: service.FAILURE Method: GetMailQueueInfoRequest Details:soap:Receiver<\/code><\/pre>\n<p><strong>Solution 5<\/strong><\/p>\n<p>add user to sshd configuration file under\u00a0AllowUsers<\/p>\n<pre><code># vim\u00a0\/etc\/ssh\/sshd_config\r\nAllowUsers Zimbra<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8211;device eth0 &#8211;bootproto static &#8211;ip *** &#8211;netmask *** &#8211;gateway *** &#8211;nameserver ***,*** &#8211;hostname host.domain.com rootpw &#8211;iscrypted $********************************** firewall &#8211;enabled &#8211;port=22:tcp authconfig &#8211;enableshadow &#8211;enablemd5 selinux &#8211;enforcing timezone &#8211;utc Europe\/*************** bootloader &#8211;location=mbr &#8211;driveorder=hda [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[33],"class_list":["post-501","post","type-post","status-publish","format-standard","hentry","category-zimbra","tag-zimbra-restore"],"_links":{"self":[{"href":"https:\/\/blog.spanger.org\/index.php?rest_route=\/wp\/v2\/posts\/501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.spanger.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.spanger.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.spanger.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.spanger.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=501"}],"version-history":[{"count":28,"href":"https:\/\/blog.spanger.org\/index.php?rest_route=\/wp\/v2\/posts\/501\/revisions"}],"predecessor-version":[{"id":513,"href":"https:\/\/blog.spanger.org\/index.php?rest_route=\/wp\/v2\/posts\/501\/revisions\/513"}],"wp:attachment":[{"href":"https:\/\/blog.spanger.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.spanger.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.spanger.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}