| Welcome to the Zimbra :: Forums! | |
Welcome, if you would like to post a comment please register.
We also encourage you to explore all things Zimbra with our team and members of the community.
|  | | 
03-10-2007, 10:05 AM
| | | Old server crashed, trying to restore, need help. So my old zimbra server crapped out. Watchdog rebooted the server and we had kernel panics trying to get back up and running (none of that is related to zimbra, just bad memory we think)
Anyway, we reinstalled RHEL4 on a new drive and mounted our old drive so we could restore zimbra from it. I've been browsing the forums and wiki to find the best way to do this but all attempts seem to fail.
Before I go about posting logs from failed attempts, I just want to know the best process for this. I've tried installing a fresh zimbra so that the scripts are all back in place, then moving /opt/zimbra out of the way and putting /mnt/oldserver/opt/zimbra in place, doing all the necessary zmcontrol stop starts and stuff. Also tried just putting the old /opt/zimbra in place and doing an install on top of it, install.sh recognized the folder and asked if I wanted to upgrade.
But after going through those the final results weren't working right. So I'm back at a clean slate and just want to know the best way to do this.
Since the old server crashed with zimbra running, there are pid files and such in place. IE, it was not cleanly shutdown. Perhaps I could chroot to the old environment and fix that... not sure.
Thanks
Oh and the old version was zcs-4.5.0_GA_612.RHEL4.tgz, I'm actually using the same tarball I did oringally, so I know I'm not getting version mismatches. | 
03-10-2007, 10:59 AM
| | Former Zimbran | |
Posts: 5,606
| | What kind of errors are you seeing?
When you start, it should tell you that there are stale PIDs in certain locations like /opt/zimbra/db, etc
You can find this in /var/log/zimbra.log
Also, don't forget to disable senmail/postfix, ldap, mysql, and httpd on your server so that they don't conflict.
In any case, post your /var/log/zimbra.log so we can help you with the errors.
Welcome to the forums!
john | 
03-10-2007, 11:12 AM
| | | Well, at the moment I don't have any errors to post, because I'm sitting at what I believe to be a 'clean slate'. I've done an ./install.sh -u. Removed everything zimbra related in /tmp, and removed /opt/zimbra. I have my old zimbra install at /mnt/oldserver/opt/zimbra, it remains as it was when our server crashed.
I have a new RHEL4 install going, I've shutdown sendmail and httpd, and disabled the firewall and SELinux for the time being.
So um, where do I start?
Never was really clear on the 'proper' procedure for this. | 
03-10-2007, 11:15 AM
| | Former Zimbran | |
Posts: 5,606
| | To start with, install your CURRENT version on your server. If you're running 4.5.0, install 4.5.0.
Then stop zimbra, and rm-rf /opt/zimbra
then
rsync -avr /old/backup/location /opt
Install your CURRENT version again as an upgrage.
Let's go to that point  | 
03-10-2007, 11:45 AM
| | | Okay here goes,
install.log Code: [root@neo tmp]# cat install.log.19485
COMMAND: zmlocalconfig -s | sed -e "s/ = \(.*\)/=\'\1\'/" > /opt/zimbra/.saveconfig/config.save
-bash: zmlocalconfig: command not found
COMMAND: zmcontrol shutdown
-bash: zmcontrol: command not found
Preparing packages for installation...
zimbra-core-4.5.0_GA_612.RHEL4-20070115195939
mkdir: cannot create directory `/opt/zimbra/ssl': File exists
Loading classes to share ... done.
Rewriting and unlinking classes ... done.
Calculating hash values for String objects .. done.
Calculating fingerprints ... done.
Removing unshareable information ... done.
Moving most read-only objects to shared space at 0x90be0000 ... done.
Moving common symbols to shared space at 0x90f5c4f0 ... done.
Moving remaining symbols to shared space at 0x91088280 ... done.
Moving string char arrays to shared space at 0x91088d10 ... done.
Moving additional symbols to shared space at 0x9110a7b8 ... done.
Read-only space ends at 0x9115eaf8, 5761784 bytes.
Moving read-write objects to shared space at 0x913e0000 ... done.
Moving String objects to shared space at 0x91969c50 ... done.
Read-write space ends at 0x919a9d78, 6069624 bytes.
Updating references to shared objects ... done.
Preparing packages for installation...
zimbra-ldap-4.5.0_GA_612.RHEL4-20070115195939
Preparing packages for installation...
zimbra-logger-4.5.0_GA_612.RHEL4-20070115195939
Preparing packages for installation...
zimbra-mta-4.5.0_GA_612.RHEL4-20070115195939
umount2: Invalid argument
umount: /opt/zimbra/amavisd/tmp: not mounted
mv: cannot stat `/opt/zimbra/amavisd': No such file or directory
chown: changing ownership of `/opt/zimbra/mysql': No such file or directory
chown: changing ownership of `/opt/zimbra/snmp': No such file or directory
chown: cannot access `/opt/zimbra/perdition-1.17': No such file or directory
Preparing packages for installation...
zimbra-snmp-4.5.0_GA_612.RHEL4-20070115195939
Preparing packages for installation...
zimbra-store-4.5.0_GA_612.RHEL4-20070115195939
Preparing packages for installation...
zimbra-apache-4.5.0_GA_612.RHEL4-20070115195939
Preparing packages for installation...
zimbra-spell-4.5.0_GA_612.RHEL4-20070115195939 These are the errors I saw while watching the upgrade process Code: Backup LDAP
bdb_db_open: unclean shutdown detected; attempting recovery.
bdb_db_open: Recovery skipped in read-only mode. Run manual recovery if errors are encountered.
....skipped
Restoring existing configuration file from /opt/zimbra/.saveconfig/config.save...done
chown: cannot access `/opt/zimbra/conf/smtpd.key': No such file or directory
chown: cannot access `/opt/zimbra/conf/smtpd.crt': No such file or directory
....skipped
Starting LDAP
ERROR: service.FAILURE (system failure: getDirectContext) (cause: javax.naming.CommunicationException localhost:389)
....Bunches of these
ERROR: service.FAILURE (system failure: getDirectContext) (cause: javax.naming.CommunicationException localhost:389)
Done Lastly, I haven't finished the zmsetup.pl of the upgrade yet because I have a ton of UNSET, items that I'm not even sure what they should be set to.
Showing on the the UNSET... Code: ******* +Spam training user: UNSET
******* +Non-spam(Ham) training user: UNSET
******* +Web server HTTP port: UNSET
******* +Web server HTTPS port: UNSET
******* +IMAP server port: UNSET
******* +IMAP server SSL port: UNSET
******* +POP server port: UNSET
******* +POP server SSL port: UNSET | 
03-10-2007, 11:50 AM
| | Former Zimbran | |
Posts: 5,606
| | Yeah, don't finish it. CTRL C
and
cat /etc/hosts
looks like your hosts file is not set up. | 
03-10-2007, 11:53 AM
| | | [root@neo zcs]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.usethesource.org localhost
67.18.241.171 neo.usethesource.org neo
67.18.241.173 mail.usethesource.org mail | 
03-10-2007, 11:56 AM
| | Former Zimbran | |
Posts: 5,606
| | Go ahead and take a trip over to the wiki, and fix the hosts file.
Then try ldap start, and tell me what you get. | 
03-10-2007, 12:11 PM
| | | Yeah, I just noticed the localhost.usethesource.org part myself. In one of my previous attempts (before posting on the forums) I had fixed that. But in my random attempts to get everything as it was I cp'd my old /etc/hosts from my old zimbra server over the correct one. With the thought that it was all working with this file before.
Ok, so right now my /etc/hosts looks like this
127.0.0.1 localhost.localdomain localhost
and thats it.
I su'd to the zimbra user and ran 'ldap start' I get this
ldap_url and ldap_master_url cannot be the same on an ldap replica | 
03-10-2007, 12:19 PM
| | Former Zimbran | |
Posts: 5,606
| | so it looks like the localconfig got wiped and we're gonna need to restore it.
If this doesn't work, then we're gonna have to build the config, and reset all of your mysql and ldap passwords:
Do all as root:
rm-rf /opt/zimbra/.saveconfig
rsync -avr /old/opt/zimbra/.saveconfig /opt/zimbra
rm -rf /opt/zimbra/conf/localconfig.xml
rsync -av /old/opt/zimbra/conf/localconfig.xml /opt/zimbra/conf
chown -R zimbra:zimbra /opt/zimbra
cd /opt/zimbra/libexec
./zmfixperms
./zmsetup.pl | | Thread Tools | Search this Thread | | | | | Display Modes | Linear Mode | | Why Join? Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.  |