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

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-2011, 05:06 AM
Junior Member
 
Posts: 6
Default Backup and Resotre ZCS Open 7.2.1 on Ubunt 10.04

Hello,

I'm trying to back up the Zimbra server, but it still fails. I tested several backup scripts, but the restore errors happen.

I'm following these steps:

zimbrabackup

Code:
#!/bin/bash

/etc/init.d/zimbra stop

rm -Rf /opt/backup/dados/*

mkdir /opt/backup/dados/
mkdir /opt/backup/dados/zimbra
mkdir /opt/backup/dados/zimbra/data
mkdir /opt/backup/dados/zimbra/db

cp -Rp /opt/zimbra/db/data /opt/backup/dados/zimbra/db
cp -Rp /opt/zimbra/index /opt/backup/dados/zimbra
cp -Rp /opt/zimbra/store /opt/backup/dados/zimbra
cp -Rp /opt/zimbra/data/ldap /opt/backup/dados/zimbra/data

/etc/init.d/zimbra start

cd /opt/backup/dados/
tar -cf zimbra.tar zimbra/
gzip -9 zimbra.tar
AND zimbrarestore


Code:
/etc/init.d/zimbra stop

mv /opt/zimbra/db/data/mysql /opt/zimbra/db/
rm -Rf /opt/zimbra/db/data
rm -Rf /opt/zimbra/index
rm -Rf /opt/zimbra/store
rm -Rf /opt/zimbra/data/ldap

cp -Rp /opt/backup/dados/zimbra/index /opt/zimbra
chown -R zimbra:zimbra /opt/zimbra/index/
cp -Rp /opt/backup/dados/zimbra/store /opt/zimbra
chown -R zimbra:zimbra /opt/zimbra/store/
cp -Rp /opt/backup/dados/zimbra/db/data /opt/zimbra/db
chown -R zimbra:zimbra /opt/zimbra/db/data/
cp -Rp /opt/backup/dados/zimbra/data/ldap /opt/zimbra/data
chown -R zimbra:zimbra /opt/zimbra/data/ldap/

rm -Rf /opt/zimbra/db/data/mysql
mv /opt/zimbra/db/mysql /opt/zimbra/db/data
chown -R zimbra:zimbra /opt/zimbra/db/

/opt/zimbra/libexec/zmfixperms

/etc/init.d/zimbra start
Erro in ldap starting.
Code:
Unable to determine enabled services from ldap.
Enabled services read from cache. Service list may be inaccurate.
Something wrong?
Reply With Quote
  #2 (permalink)  
Old 09-28-2011, 07:02 AM
Zimbra Consultant & Moderator
 
Posts: 20,317
Default

Quote:
Originally Posted by rafael.xapa View Post
Erro in ldap starting.
Code:
Unable to determine enabled services from ldap.
Enabled services read from cache. Service list may be inaccurate.
Something wrong?
Yes, the usual answer to this questions is: there a problem with your DNS A & MX records or the /etc/hosts file. Go to the Split DNS and check the setting by running all the commands in the 'Verify...' section. Did you also read some of the wiki (and forum/blog) articles on how to backup and restore a Zimbra server? You can also check the log files for any further errors. What exactly are you trying to do with this procedure?
__________________
Regards


Bill
Reply With Quote
  #3 (permalink)  
Old 09-28-2011, 07:10 AM
Junior Member
 
Posts: 6
Default

Yes, I tested various backup scripts, but all did not work.

What I did:

Two servers installed Ubuntu 10.04 and the same version of Zimbra. (identical)

Server 1:
- I created email accounts and recorded some data.

- Run the zimbrabackup (above)

- Download the tar.gz file to the server 2

- Run the zimbrarestor (above) to test the server 01. And zimbra functioned normally.

Server 2:

- Run the zimbrarestore (above)

And the errors appeared (code)



I'm trying backup script.
(Google tradutor :S )

Last edited by rafael.xapa; 09-28-2011 at 07:18 AM.. Reason: (Google tradutor :S )
Reply With Quote
  #4 (permalink)  
Old 09-28-2011, 08:24 AM
Zimbra Consultant & Moderator
 
Posts: 20,317
Default

Quote:
Originally Posted by rafael.xapa View Post
Yes, I tested various backup scripts, but all did not work.
The implied question in what I posted above about the Split DNS is:...... is the hostname and DNS A & MX records the same for the new server? You also didn't answer the question about what exactly you're trying to do with this procedure?
__________________
Regards


Bill
Reply With Quote
  #5 (permalink)  
Old 09-28-2011, 08:42 AM
Junior Member
 
Posts: 6
Default

Yes, they are equal .. the ips, password, dns, hostname, all.

Servers 1 and 2 are for testing. I have a Zimbra server in the air, because I need to do a backup of the data.
Reply With Quote
  #6 (permalink)  
Old 09-28-2011, 11:51 AM
Elite Member
 
Posts: 285
Default

Why not make life easy:

Backup:
rsync -avHK --delete /opt/zimbra/ /backup/zimbra
su - zimbra -c"/opt/zimbra/bin/zmcontrol stop"
ORPHANED=`ps -u zimbra -o "pid="` && kill -9 $ORPHANED
rsync -avHK --delete /opt/zimbra/ /backup/zimbra
su - zimbra -c "/opt/zimbra/bin/zmcontrol start"

Restore:
Replace /opt/zimbra

Not my script:
Open Source Edition Backup Procedure - Zimbra :: Wiki
scroll down to: 'A Simple Shell Script Method'

I'm using this script with little adjustments for my needs. Server is down for no longer then 5 minutes each night.
Reply With Quote
  #7 (permalink)  
Old 09-28-2011, 12:33 PM
Junior Member
 
Posts: 6
Default

i'll try ur script.

You do not use the fixperms?
Reply With Quote
  #8 (permalink)  
Old 09-28-2011, 12:36 PM
Elite Member
 
Posts: 285
Default

No. I'm just running the script for backup and will follow the right procedure to restore if necessary.

Note that I only posted parts of my script of course!
Reply With Quote
  #9 (permalink)  
Old 09-28-2011, 12:41 PM
Junior Member
 
Posts: 6
Default

Humm, this is my problem: restore.

When restore backup, many problems happen.

Anyway, thank you!
Reply With Quote
  #10 (permalink)  
Old 09-28-2011, 12:43 PM
Elite Member
 
Posts: 285
Default

You know the right procedure to restore?

Make a clean install of the same Zimbra version
Shutdown Zimbra
Delete /opt/zimbra
Restore from backup
Startup Zimbra
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


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.