Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Backup and Resotre ZCS Open 7.2.1 on Ubunt 10.04

Hybrid View

  1. #1
    Join Date
    Sep 2011
    Posts
    6
    Rep Power
    4

    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?

  2. #2
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    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


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    Join Date
    Sep 2011
    Posts
    6
    Rep Power
    4

    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 08:18 AM. Reason: (Google tradutor :S )

  4. #4
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    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


    Acompli: A new adventure for Co-Founder KevinH.

  5. #5
    Join Date
    Sep 2011
    Posts
    6
    Rep Power
    4

    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.

  6. #6
    Join Date
    Apr 2009
    Posts
    304
    Rep Power
    6

    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.

  7. #7
    Join Date
    Sep 2011
    Posts
    6
    Rep Power
    4

    Default

    i'll try ur script.

    You do not use the fixperms?

  8. #8
    Join Date
    Apr 2009
    Posts
    304
    Rep Power
    6

    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!

  9. #9
    Join Date
    Sep 2011
    Location
    Texas
    Posts
    150
    Rep Power
    4

    Default

    Quote Originally Posted by Tripple View Post
    No. I'm just running the script for backup and will follow the right procedure to restore if necessary.
    But have you tried restoring on a new box to test your backups?

  10. #10
    Join Date
    Apr 2009
    Posts
    304
    Rep Power
    6

    Default

    Quote Originally Posted by LHammonds View Post
    But have you tried restoring on a new box to test your backups?
    More then once.
    Every now and then I'm using VirtualBox on my desktop for that purpose and make sure the network settings look like the one from the Zimbra server.

    Once I had to do a disaster recovery on a production server. Same procedure, had that server up and running in no time with a minimal loss of data.
    Last edited by Tripple; 09-29-2011 at 07:22 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •