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

Thread: What's the backup/migration procedure?

  1. #1
    Join Date
    Aug 2006
    Posts
    58
    Rep Power
    9

    Default What's the backup/migration procedure?

    Still attempting to get acquainted with Zimbra. I'm running the OpenSource GA version. Assuming I wanted to backup the mailboxes and either migrate them to a new server or restore them for some reason what is the suggested way of handling this?

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

    Default

    This is also covered in the wiki here , there are also some articles in the forums about migration/backup to a new server.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    Join Date
    Aug 2006
    Posts
    58
    Rep Power
    9

    Default

    I had seen that article but was looking for something a little more clear cut. Thanks for the reply nonetheless.

  4. #4
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    21

    Default

    Hi dbo,
    I helped write the wiki. Do you have a specific question?

  5. #5
    Join Date
    Aug 2006
    Posts
    58
    Rep Power
    9

    Default

    No no, the Wiki is fine. It's just a learning preference. I try and find a more general type explanation on how it should work in theory and then dig into the details to actually get it to work. That article just seems to skip the Lehman's terms I like

  6. #6
    Join Date
    Aug 2006
    Posts
    58
    Rep Power
    9

    Default

    I'm writing some Perl scripts to handle backuping/restoring Zimbra. It's going fairly well except I'm confused on one point. The Wiki page suggests that you stop the server when doing a backup to avoid unwanted results. That's all fine and dandy, but what if people are trying to access their mailboxes during this period? I assume you would want to do a backup at least daily, and even more frequently depending on the size/type of the organization. What's the thought process behind a solution to this?

  7. #7
    Join Date
    Oct 2005
    Location
    Harrisburg, Pennsylvania
    Posts
    155
    Rep Power
    10

    Default

    Quote Originally Posted by dbo
    The Wiki page suggests that you stop the server when doing a backup to avoid unwanted results. That's all fine and dandy, but what if people are trying to access their mailboxes during this period? I assume you would want to do a backup at least daily, and even more frequently depending on the size/type of the organization. What's the thought process behind a solution to this?
    Howdy,

    You bring up an excellent point, and that's considered one of the bigger downsides to the open source edition of Zimbra.

    The commercial version offers hot, on-the-fly backups. With the OSS version, you have to bring it down to start the backup procedure.

    That said, the LVM snapshots which I think are used in the scripts mentioned in the wiki attempt to handle that... LVM snapshots are quite cool.

    They take a snapshot of /opt/zimbra at a certain period of time, and name the snapshot something like /opt/zimbra-backup. LVM snapshots make it so that when you look at /opt/zimbra-backup, it always appears to be the exact data that was in /opt/zimbra at the time of the snapshot, even though it hasn't done a full copy of the data (note how the partition used for backups is only 1000MB).

    Instead of copying all of the data in /opt/zimbra to /opt/zimbra-backup, it only copies data that's changed. Everything else is assumed to be the same.

    If you do an 'ls' on /opt/zimbra-backup, it'll *look* like all the data that was there at the time of the snapshot.

    What this means is that you can take down the service very briefly.. quick create the LVM snapshot, and put the service back up. Then, you begin copying the data from /opt/zimbra-backup to some other destination.

    The job of the LVM drivers is to make the above as seamless as possible :-)

    Hopefully that helps.

    Another idea for backups would be to use DRBD, a driver that does something akin to RAID 1 mirroring, but over a network. That way, two servers remain in sync. If one goes down, you bring the other one up.

    Just some thoughts.

    Good luck :-)
    -Eric

  8. #8
    Join Date
    Aug 2006
    Posts
    58
    Rep Power
    9

    Default

    Interesting. I'll have to look into that later.

    Currently I'm writing some pretty generic scripts for testing backup/restores. I'm apparantly missing something because three attempts have resulted in three failures. My current process is:

    BACKUP
    ------------------
    -Stop the Zimbra server
    -Copy the /opt/zimbra directory to the /BACKUP directory
    -Start the server

    RESTORE
    ------------------
    -Stop the Zimbra server
    -Remove the old /opt/zimbra directory
    -Copy the /BACKUP/zimbra to /opt/zimbra
    -Verify sendmail is off/stopped
    -Extract the the tar files for install
    -Invoke the install.sh script (fails)
    -Invoke the install.sh script (it now runs)
    -Run the install as an upgrade
    -Reset the permissions (chown -R zimbra:zimbra /opt/zimbra/st*)

    I then attempt to log into the web admin console and authentication fails. Any ideas? My other question is, how might I verify that the mailboxes are still in tact?

  9. #9
    Join Date
    Aug 2006
    Posts
    58
    Rep Power
    9

    Default

    In short, here's the code.

    BACKUP
    -----------------
    su - zimbra -c 'zmcontrol stop'
    rm -rf /root/Desktop/BACKUP/zimbra
    cp -rp /opt/zimbra /root/Desktop/BACKUP/
    su - zimbra -c 'zmcontrol start'

    RESTORE
    -----------------
    su -zimbra -c 'zmcontrol stop'
    rm -rf /opt/zimbra
    cp -rp /BACKUP/zimbra /opt
    chkconfig sendmail off
    service sendmail stop
    tar xzf zcs-3.1.4_GA_518.FC4.tgz
    ./install.sh
    chown -R zimbra:zimbra /opt/zimbra/st*
    Last edited by dbo; 08-10-2006 at 06:37 AM.

  10. #10
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    21

    Default

    what does a
    su -zimbra
    zmcontrol start

    return?

Similar Threads

  1. Replies: 6
    Last Post: 06-03-2007, 06:02 AM
  2. Correct Installation procedure?
    By ikmsupport in forum Installation
    Replies: 3
    Last Post: 10-15-2006, 08:23 PM
  3. Installation procedure for already operational server
    By Gourmet in forum Administrators
    Replies: 5
    Last Post: 03-07-2006, 07:41 AM
  4. Best Procedure for new install M2 on FC3
    By chamo in forum Installation
    Replies: 5
    Last Post: 11-18-2005, 12:47 PM

Posting Permissions

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