Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

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.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-28-2007, 09:32 AM
Special Member
 
Posts: 170
Default Backup and Restore of 4.5.7 CE

I've successfully backed up a running copy of 4.5.7 CE on CentOS5 which seems to be working fine. I'm using the LVM method, and I make the snapshot while Zimbra is not running.

However, it doesn't seem to matter what I do, I can't get tomcat running on the restored machine. I'm restoring to another computer that's running the exact same version (4.5.7) and then I run install.sh and do an upgrade. Everything seems to work except for tomcat, which when I do zmcontrol status, it always says

tomcat is not running

And of course, I get some error about a stale PID being found in the zimbra log.

I've tried the instructions exactly as stated in the Wiki and in the forum posts I've found. As I was typing this post, I think I've fixed my problem, so I guess I'll share it with everybody, hope it helps, and maybe someone can explain why I had to do this.

At any rate, here's what fixed it -

1. I started out with a running test production server and a backup server that was actually already set up as a zimbra server.
2. I backed up the test production server using the LVM backup method (I used a short cold backup -- the Zimbra server was only down for a few seconds, long enough to take the snapshot).
3. I copied the /opt/zimbra folder from the backup (version 4.5.7) and copied it over the backup server's /opt/zimbra folder (which had also already been set up as 4.5.7).
4. I upgraded the backup server using install.sh from a 4.5.7 install tar file.
5. zmcontrol start, tomcat won't start.
6. Whoops, Wiki article said to run /opt/zimbra/libexec/zmfixperms first. Did that.
7. zmcontrol start, tomcat still won't start.
8. Hit with sledgehammer, knowing it won't work but frustrated and wanting to break something ---> chown -R zimbra:zimbra /opt/zimbra
9. zmcontrol start
10. Well, of course, that was stupid, now postfix won't start. I should have known that.
11. Forget it, it's time to wipe it all out and try again and write a forum post asking what I'm doing wrong, but first, for the heck of it (believing I've messed up the permissions beyond repair)
12. /opt/zimbra/libexec/zmfixperms again
13. SUCCESS!!!

So, it seems that somewhere along the lines, zmfixperms is supposed to chown something zimbra:zimbra but it doesn't do it. My sledgehammer "chown -R zimbra:zimbra /opt/zimbra" did, and running zmfixperms again undid the damage done by my sledgehammer.

Is this just a bug in zmfixperms? Or am I doing something else wrong?

Anyway, I'm now off to see if I can accomplish the same procedure without having to do the "upgrade" portion.
Reply With Quote
  #2 (permalink)  
Old 09-28-2007, 09:53 AM
Moderator
 
Posts: 927
Default

The first time you used zmfixperms, did you run it as root or as the zimbra user?
Reply With Quote
  #3 (permalink)  
Old 09-28-2007, 10:10 AM
Special Member
 
Posts: 170
Default

Now, THAT command I know I ran as root. I tried it as zimbra user once and it yelled at me and complained about not having permission to set the permissions on all those files.

That was the correct way of doing it, wasn't it?

Oh BTW, looks as if I got a bit greedy when it came to trying to get it running without an upgrade. Tomcat wouldn't start, even with my hack mentioned above. Anyone else been successful in doing a restore without an upgrade? I have some anti-spam changes, etc., that I don't think survive the upgrade.
Reply With Quote
  #4 (permalink)  
Old 09-28-2007, 12:19 PM
Partner (VAR/HSP)
 
Posts: 197
Smile Worksforme

I have used the same approach as you described above successfully, with a few the exceptions:
1. Before migrating, checking /etc/passwd to ensure the user ids are the same
2. Executing /opt/zimbra/libexec/zmfixperms as the zimbra user

I would have expected any anti-spam customisations to be retained.
Reply With Quote
  #5 (permalink)  
Old 10-02-2007, 08:53 AM
Special Member
 
Posts: 170
Default

I was just going off the notice in the Improving Anti-Spam wiki that said that many of the changes made there wouldn't survive an upgrade...


... and didn't you get errors saying you don't have permission to change the permissions on these files when running zmfixperms as zimbra?
Reply With Quote
  #6 (permalink)  
Old 10-30-2007, 03:44 PM
Special Member
 
Posts: 170
Default

UPDATE : With 4.5.8, I don't seem to need to do the whole "upgrade" step. Just have a server running the same version of Zimbra, stop the services, copy over /opt/zimbra, run chown -R zimbra:zimbra /opt/zimbra, /opt/zimbra/libexec/zmfixperms, and start the services, and voila! Actually, I didn't try it without the last two permissions-related steps, so I'm not sure they're still absolutely necessary, but those could easily be scripted and don't kill any of your customizations. This would allow you to always have a backup server running with up-to-date data as of the last backup. Is anyone else trying anything like this?

Last edited by bjquinn; 10-30-2007 at 03:46 PM..
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.