Restore from completely broken installation

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
empe
Posts: 20
Joined: Fri Sep 12, 2014 10:44 pm

Restore from completely broken installation

Post by empe »

Hi there,

last weekend I tried to dist upgrade my ubuntu 14.04 to 16.04 containing zcs 8.8.9. But unfortunately it failed and my installation is not working anymore.
I tried to rsync the complete /opt/zimbra backup and reinstalled zcs providing the last .install_history and localconfig.xml then ran zmsetup.pl. This did not work as the last settings (domain etc.) did not show up.
As I urgently need to be able to receive e-mails I directed the MX record to a provider just for being able to receive e-mails.

Is there any chance to get the .msg files reporocessed?
My idea was to prepare a imap server and "somehow" put all these files in there. Then I could transfer them to a new life server (imap-sync or what ever).
Is the .msg format comparable/same as the one of Maildir files? Could they be converted?

May be there is any other suggestion how to restore my e-mails. Are there any tools which could help me?
I searched the whole weekend but could not find somethind useful.

Any idea is very welcome to rescue round about 180k e-mails (count, not size).

Thank You so much!
Michael
User avatar
axslingr
Outstanding Member
Outstanding Member
Posts: 256
Joined: Sat Sep 13, 2014 2:20 am
ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 UBUNTU18

Re: Restore from completely broken installation

Post by axslingr »

Since you have a backup of /opt/zimbra, I'd start over with a fresh install of Ubuntu 16.04 and do this:

1. Install Zimbra 8.8.9 with the -s option.
2. Delete the resulting /opt/zimbra directory.
3. Restore your copy of /opt/zimbra.
4. Run ./install.sh normally and it should perform an upgrade.

Lance
empe
Posts: 20
Joined: Fri Sep 12, 2014 10:44 pm

Re: Restore from completely broken installation

Post by empe »

axslingr wrote:Since you have a backup of /opt/zimbra, I'd start over with a fresh install of Ubuntu 16.04 and do this:

1. Install Zimbra 8.8.9 with the -s option.
2. Delete the resulting /opt/zimbra directory.
3. Restore your copy of /opt/zimbra.
4. Run ./install.sh normally and it should perform an upgrade.

Lance
Hi Lance,

thanks for your reply!
I nearly did this on another machine at home.

The broken machine is virtual server and not that fast. Also I needed to change the real MX records so I can receive e-mails somewhere else.

Before doing these steps I also installed a DNS resolver and mocked the beforehand settings (hopefully all is correct).

My zcs started up but I could not connect via IMAP. So I also updated from 8.8.9 to 8.8.11 (still having a copy from 8.8.9). When I start zcs everything but dnsproxy and proxy came up. I think dnsproxy is fine to fail as there is already a BIND9 running. proxy also failed on my VPS - I guess this service is not really needed on a single host installation.
I cannot login on Web UI or Admin UI. But I could send an e-mail via sendmail (at least the logs showed successful sending.
But when I tried to imapsync via

Code: Select all

imapsync \
	--host1 [restored zcs] \
	--port1 7143 \
	--timeout1 10 \
	--user1 [...] \
	--password1 [...] \
	--authmech1 LOGIN \
	--tls1 \
	--host2 [working new HOSTED zcs] \
	--port2 993 \
	--timeout2 10 \
	--user2 [...] \
	--password2 [...] \
	--debugimap1 \
	--debugimap2 \
	--usecache \
	--debugssl 4
I am getting

Code: Select all

Connecting with IO::Socket::IP PeerAddr [restored zcs] PeerPort 7143 Proto tcp Timeout 10 Debug 1
Connected to [restored zcs]
ERROR: timeout waiting 10s for data from server at /usr/local/share/perl/5.18.2/Mail/IMAPClient.pm line 1891.
	Mail::IMAPClient::__read_more('Mail::IMAPClient=HASH(0x5202e20)', 'IO::Socket::IP=GLOB(0x52ff6f0)', 10) called at /usr/local/share/perl/5.18.2/Mail/IMAPClient.pm line 1857
	Mail::IMAPClient::_read_more('Mail::IMAPClient=HASH(0x5202e20)', 'IO::Socket::IP=GLOB(0x52ff6f0)', 10) called at /usr/local/share/perl/5.18.2/Mail/IMAPClient.pm line 1668
	Mail::IMAPClient::_read_line('Mail::IMAPClient=HASH(0x5202e20)') called at /usr/local/share/perl/5.18.2/Mail/IMAPClient.pm line 1404
	Mail::IMAPClient::_get_response('Mail::IMAPClient=HASH(0x5202e20)', '*', 'PREAUTH') called at /usr/local/share/perl/5.18.2/Mail/IMAPClient.pm line 407
	Mail::IMAPClient::Socket('Mail::IMAPClient=HASH(0x5202e20)', 'IO::Socket::IP=GLOB(0x52ff6f0)') called at /usr/local/share/perl/5.18.2/Mail/IMAPClient.pm line 368
	Mail::IMAPClient::connect('Mail::IMAPClient=HASH(0x5202e20)') called at /root/download/imapsync/imapsync line 4267
	main::login_imap([restored zcs], 7143, [user1], undef, [password1], 1, 10, 0, undef, ...) called at /root/download/imapsync/imapsync line 1438
Host1 failure: can not open imap connection on host1 [restored zcs] with user [user1]: timeout waiting 10s for data from server 
I also wonder why there is no listener on port 143 neither on 993. But there is are listeners on 7143 and 7993 (reported by 'lsof -i TCP').

I am also not sure which log file can give any useful hint - sorry, I am not a Zimbra specialist (may be I should have never tried to run my own zcs although it worked since many years even with migrating to different VPS).

Any further help would really safe my ass!

Thanks a lot.
Michael
User avatar
axslingr
Outstanding Member
Outstanding Member
Posts: 256
Joined: Sat Sep 13, 2014 2:20 am
ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 UBUNTU18

Re: Restore from completely broken installation

Post by axslingr »

empe wrote: Before doing these steps I also installed a DNS resolver and mocked the beforehand settings (hopefully all is correct).
The most important thing is to make sure the hostname and ip address are exactly the same as the server where your /opt/zimbra backup came from. This is CRITICAL to restoring your backup!
My zcs started up but I could not connect via IMAP. So I also updated from 8.8.9 to 8.8.11 (still having a copy from 8.8.9). When I start zcs everything but dnsproxy and proxy came up. I think dnsproxy is fine to fail as there is already a BIND9 running. proxy also failed on my VPS - I guess this service is not really needed on a single host installation.
I never install dnscache and I'd suggest you do the same since you have bind running. You absolutely need proxy working though. This is probably why you can't connect to imap or web client.

Lance
empe
Posts: 20
Joined: Fri Sep 12, 2014 10:44 pm

Re: Restore from completely broken installation

Post by empe »

The most important thing is to make sure the hostname and ip address are exactly the same as the server where your /opt/zimbra backup came from. This is CRITICAL to restoring your backup!
Thanks for the hint. Is it possible to change safely the IP of the installed zcs on my restore machine?
This would it make much more easy for me.
You absolutely need proxy working though.
I will try my best but lasat try failed to run zmproxyconfgen. Will retry and procide some information later.
empe
Posts: 20
Joined: Fri Sep 12, 2014 10:44 pm

Re: Restore from completely broken installation

Post by empe »

PS: this happens when I run zmproxyconfgen:

Code: Select all

$ ./zmproxyconfgen 
[] WARN: Invalid value found in 'zimbraReverseProxyAvailableLookupTargets': vmd10085.contabo.host
Please correct and run zmproxyconfgen again
[] WARN: No available nginx lookup handlers could be found
Exception in thread "main" java.lang.NullPointerException
	at com.zimbra.cs.util.ProxyConfVar.isValidUpstream(ProxyConfGen.java:310)
	at com.zimbra.cs.util.WebLoginSSLUpstreamServersVar.update(ProxyConfGen.java:1099)
	at com.zimbra.cs.util.ProxyConfGen.updateDefaultVars(ProxyConfGen.java:2984)
	at com.zimbra.cs.util.ProxyConfGen.createConf(ProxyConfGen.java:3167)
	at com.zimbra.cs.util.ProxyConfGen.main(ProxyConfGen.java:3364)
having

Code: Select all

$ nslookup vmd10085.contabo.host
Server:		127.0.0.1
Address:	127.0.0.1#53

Name:	vmd10085.contabo.host
Address: 192.168.10.2
which indeed is the correct IP of my restore machine.
User avatar
axslingr
Outstanding Member
Outstanding Member
Posts: 256
Joined: Sat Sep 13, 2014 2:20 am
ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 UBUNTU18

Re: Restore from completely broken installation

Post by axslingr »

What is the original server hostname and ip address?

What operating system are you installing Zimbra on?

Changing the ip address can be done eventually but we need to get your backup restored to a functioning state first.

Lance
empe
Posts: 20
Joined: Fri Sep 12, 2014 10:44 pm

Re: Restore from completely broken installation

Post by empe »

What is the original server hostname and ip address?
vmd10085.contabo.host 5.189.166.113
What operating system are you installing Zimbra on?
Ubuntu 14.04 64bit
Changing the ip address can be done eventually but we need to get your backup restored to a functioning state first.
Got it.

What would then be the net step?
User avatar
axslingr
Outstanding Member
Outstanding Member
Posts: 256
Joined: Sat Sep 13, 2014 2:20 am
ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 UBUNTU18

Re: Restore from completely broken installation

Post by axslingr »

vmd10085.contabo.host 5.189.166.113

Ubuntu 14.04 64bit
At this point you're better off moving to Ubuntu 16.04 because 14.04 will be no longer supported after April. So I'd start all over with 16.04 and just download that version of 8.8.9. Make sure that your hostname and ip are set to the above before you go back through the steps again.

Also, disable apparmor:

Code: Select all

sudo systemctl stop apparmor
sudo systemctl disable apparmor
sudo apt remove -y apparmor
reboot
Lance
empe
Posts: 20
Joined: Fri Sep 12, 2014 10:44 pm

Re: Restore from completely broken installation

Post by empe »

Actually there is no need to have support anymore as I already moved to a hosted zcs.
The only thing I want to achieve is a running "restore box" so I can imapsync my stuff to the new provider.
My "restore box" currently runs with 14.04.
So shall I remove apparmor from that box?
<< will continue tomorrow <<
Thanks!
Post Reply