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

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
  #91 (permalink)  
Old 09-20-2006, 08:57 AM
Former Zimbran
 
Posts: 294
Default

Hi Dirk,

Thanks for your really brave efforts

You can install the Perl modules like this:

Code:
perl -MCPAN -e 'install Some::Module'
(where Some::Module is the name of the missing module)

In your case, currently, it is Proc::ProcessTable, so the command will be:

Code:
perl -MCPAN -e 'install Proc::ProcessTable'
If you have not installed Perl modules using cpan earlier, you will come across an interactive session wherein you will be asked a few simple questions. Once you answer these questions, cpan will download the required module and install it on your system.

After Proc::ProcessTable is installed, you should try to run the script again when, if any other module is missing, it will show a similar error as you got - with the name of missing module.

Once all modules are installed, this script should run.

EDIT: To check if the module exists, do this:

Code:
perl -e 'use Some::Module'
If it gives out nothing. The module exists.
If the module does not exist, it will give out the same kind of error, you got above.

All the best and thanks,
__________________
Regards,

Chintan Zaveri
(Yet another ZIMBRAN!)

"Dhundhne par Bhagwan bhi ..."

Last edited by czaveri; 09-20-2006 at 09:01 AM..
Reply With Quote
  #92 (permalink)  
Old 09-20-2006, 12:42 PM
Former Zimbran
 
Posts: 294
Default Semi-Hot Backup

Here is a code that works! But restoration is still not worked out.

Comments?

Notes:
1. I am currently dumping LDAP data in XML files, so could be ok for few accounts (perhaps <100-150) but am considering the change to using SQLite.
2. I am currently stopping and starting LDAP for backing it up, and looking for other alternatives. Suggestions? (I am aware of slapcat, but that would also require ldap stopped).
3. Am I backing up the correct directory for LDAP?
4. I am assuming that if I stop LDAP, no accounts can be created at that time. If no accounts are created, no entries are made in the 'zimbra' database. At the time when LDAP is stopped, I backup 'zimbra' database. (Not the 'mailbox$id' databases). So, I believe, the data in LDAP will be in sync with data in 'zimbra' database. Am I right/wrong in assuming so?

Thanks,

P.S. Rename the file extension from "txt" to "pl".
Attached Files
File Type: txt zimbraHotBackup.txt (19.0 KB, 703 views)
__________________
Regards,

Chintan Zaveri
(Yet another ZIMBRAN!)

"Dhundhne par Bhagwan bhi ..."

Last edited by czaveri; 09-20-2006 at 12:49 PM.. Reason: I had left my email address in the email address field - removed it
Reply With Quote
  #93 (permalink)  
Old 09-20-2006, 01:23 PM
Moderator
 
Posts: 927
Default

Right, it took a while to get the install to work, it kept complaining about the program CC not being installed. Eventually though, I got it all sorted and installed the needed modules, so now when the script executes, the help text is displayed. Cool. Time to test

Command executed with /opt/zimbra/zimbraColdBackup --confirm
it's in progress now and may take a while as this system is a little slow, I assume I should file a copy of the zimbra folder in /backup if it's worked correctly, and an email from the system telling me the same.

I'll post back with the results.
Reply With Quote
  #94 (permalink)  
Old 09-20-2006, 01:39 PM
Moderator
 
Posts: 927
Default

Looks to be a sucess
I didnt get the email notification though, and yes, I did set the entries at the top of the script to provide the address to send to and the send yes/no flag. Though I'm not sure how the script can send a message if the zimbra services are stopped.

On the whole though, it looks great. I'll set up a task to run this every few days and job done. Thanks for your efforts on this Czaveri, I look forward to the next version!
Reply With Quote
  #95 (permalink)  
Old 09-20-2006, 01:39 PM
Former Zimbran
 
Posts: 294
Default

Thanks Dirk,

If it works for you, you can also try an experiment with the Restoration.

su - zimbra -c 'zmcontrol stop'
( wait for 10 - 15 seconds)
kill -9 `ps -U zimbra|grep [0-9]|awk '{print $1}'` > /dev/null
(It would be better if you can simply kill with the kill command directly - the above command must be used only if kill won't kill)
mv /opt/zimbra /opt/zimbra_orig
mv /backup/the_backed_up_directory_name /opt/zimbra
su - zimbra -c 'zmcontrol start'
__________________
Regards,

Chintan Zaveri
(Yet another ZIMBRAN!)

"Dhundhne par Bhagwan bhi ..."

Last edited by czaveri; 09-20-2006 at 01:43 PM..
Reply With Quote
  #96 (permalink)  
Old 09-20-2006, 01:41 PM
Former Zimbran
 
Posts: 294
Default

I am really glad it worked!

You should get a notification in another 5 mins. (The script uses Mail::Mailer module, which in turn, uses 'sendmail' on your system to send email. If it cannot deliver immediately - it will try again after sometime).

Please let me know if it won't arrive.

Thanks and regards,
__________________
Regards,

Chintan Zaveri
(Yet another ZIMBRAN!)

"Dhundhne par Bhagwan bhi ..."

Last edited by czaveri; 09-20-2006 at 02:18 PM..
Reply With Quote
  #97 (permalink)  
Old 09-21-2006, 07:11 AM
Moderator
 
Posts: 927
Default

The report email never did arrive. I'll be checking this script out on another installation shortly and see how that goes. In the meantime, which logfile, if any, may this have hit so I can see what happened?
Reply With Quote
  #98 (permalink)  
Old 09-22-2006, 03:04 PM
Senior Member
 
Posts: 72
Default

I'm guessing it may not ever arrive due to /usr/sbin/sendmail being linked to /opt/zimbra/postfix/sbin/sendmail this is on a SuseEL install. And due to zimbra running SMTP asking sendmail to send it could cause problems since port 25 will be in use when sendmail tries to deliver the message to zimbra.
The only other way around this I can see is restart zimbra, sleep 5 -10 minutes then issue the mail command.
I could be entirely wrong on this (and it wouldn't surprise me if i were...) so take it with a grain of salt.
Reply With Quote
  #99 (permalink)  
Old 09-25-2006, 01:04 AM
Former Zimbran
 
Posts: 294
Default

Hello Dirk,

I am sorry, couldn't reply earlier, I was on a short vacation last few days...

Sendmail writes logs in /var/log/maillog.

I wasn't aware, that the system sendmail binary is linked to /opt/zimbra/postfix/sbin/sendmail on a SuSE EL system.

(For me it works perfect on a CentOS 4.x)

What kechols says, could be one option, ...

I will play with this for sometime and come back - with some idea.

Sincerely,
__________________
Regards,

Chintan Zaveri
(Yet another ZIMBRAN!)

"Dhundhne par Bhagwan bhi ..."
Reply With Quote
  #100 (permalink)  
Old 09-27-2006, 02:01 PM
Member
 
Posts: 12
Default solid backup procedure

Has anyone figured out a solid way to backup open source zimbra w. out shutting the services down? we would really like to use zimbra, but due to a high volume of incoming emails at night, we can't afford to shut it down for backup because it will take at least 2 hours of down time. Please help me out w. that if you have a solution that you deployed in to production.
Or... is there a way to shut it down for backup and still have incoming emails get trapped somewhere for delivery?
Thank you.

Last edited by Shurik; 09-27-2006 at 02:29 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.