Results 1 to 9 of 9

Thread: [SOLVED] Question about backup Zimbra

  1. #1
    Join Date
    Oct 2009
    Posts
    13
    Rep Power
    6

    Default [SOLVED] Question about backup Zimbra

    Hello, I am a newbie on Zimbra and even linux....

    My system is CentOS 5.3 and ZCS 6.0.

    I would like to ask about backup on my Zimbra.

    I had tried to read the backup topic on zimbra wiki, and I got some scripts. However, I don't exactly know what is going on [poor in scripting X_X ].
    Now, I have some question on the backup procedures.
    Do I need to backup the MYSQL DB? or just the zimbra folder?

    Apart from the backup script . Does it works If I just copy /opt/zimbra to another location [e.g. /Zimbra-backup] ?

    sorry for the silly question...

    Thanks a lot.
    Otac

  2. #2
    Join Date
    Jul 2007
    Location
    Baltimore
    Posts
    1,649
    Rep Power
    11

    Default

    I don't know much about the community developed backup scripts because we use the network edition, but yes you definately need the mysql dbs. the messages are stored as plain files in /opt/zimbra/store but all hte metaata about them as well as their location wtihin a mailbox is stored in the sql database. theres other things like the ldap database that have to be backed up to.

    As far as just backing up /opt/zimbra goes, this should only be done if you are able to stop zimbra for the duration of your backup. The reason is you do not want to be backing up files that are being written to at the time, especially sql databases (this can lead to corruption). So if you can stop zimbra, backup the /opt/zimbra directory, then start it then this isn't a half bad disaster recovery method.

  3. #3
    Join Date
    May 2006
    Location
    England.
    Posts
    927
    Rep Power
    10

    Default

    Although I dont use it myself, I think you can 'freeze' the drive if it's formatted with LVM so the backup can be taken while Zimbra is running. I think one of the community scripts would handle this for you.

  4. #4
    Join Date
    Oct 2009
    Posts
    13
    Rep Power
    6

    Default

    thank you for all replies.

    it is ok for me to stop the zimbra during mid-night.
    Does the script (found in forum) backup SQL DB too?

    Thanks again

  5. #5
    Join Date
    Feb 2007
    Location
    Portland, OR
    Posts
    1,147
    Rep Power
    10

    Default

    Most of the backup scripts for the OS version that you find here use one of these methods:

    1. The simple method
      Advantages: Simple
      Disadvantages: Longest downtime of all the methods
      1. Shut down Zimbra
      2. Copy /opt/zimbra
      3. Start Zimbra
    2. Rsync method
      Advantages: Relatively Simple, much quicker then the above method
      Disadvantages: Still a noticeable downtime that will increase as your system grows
      1. rsync the /opt/zimbra directory to the backup directoy while Zimbra is running
      2. Shut down Zimbra
      3. rsync again while Zimbra is offline to get the "real" backup
    3. LVM method
      Advantages: Downtime is virtually non-existent
      Disadvantages: /opt/zimbra must be on a LVM volume, so this must have been setup when the system was installed (or migrated later)
      1. Shut down Zimbra
      2. Create a LVM snapshot of the volume Zimbra is on (almost instant)
      3. Start Zimbra
      4. Mount the snapshot and copy/rsync the backup from that


    All of these methods accomplish a complete copy of the /opt/zimbra directory which is all you need to backup everything about Zimbra. I use the LVM method on my server as the total downtime is only as long as it takes to do "zmcontrol stop; zmcontrol start"

  6. #6
    Join Date
    Oct 2009
    Posts
    13
    Rep Power
    6

    Default

    Thanks, very details.
    That's mean I don't need to backup MYSQL DB? or I need to do it separately?
    Thanks again

    Quote Originally Posted by ArcaneMagus View Post
    Most of the backup scripts for the OS version that you find here use one of these methods:

    1. The simple method
      Advantages: Simple
      Disadvantages: Longest downtime of all the methods
      1. Shut down Zimbra
      2. Copy /opt/zimbra
      3. Start Zimbra
    2. Rsync method
      Advantages: Relatively Simple, much quicker then the above method
      Disadvantages: Still a noticeable downtime that will increase as your system grows
      1. rsync the /opt/zimbra directory to the backup directoy while Zimbra is running
      2. Shut down Zimbra
      3. rsync again while Zimbra is offline to get the "real" backup
    3. LVM method
      Advantages: Downtime is virtually non-existent
      Disadvantages: /opt/zimbra must be on a LVM volume, so this must have been setup when the system was installed (or migrated later)
      1. Shut down Zimbra
      2. Create a LVM snapshot of the volume Zimbra is on (almost instant)
      3. Start Zimbra
      4. Mount the snapshot and copy/rsync the backup from that


    All of these methods accomplish a complete copy of the /opt/zimbra directory which is all you need to backup everything about Zimbra. I use the LVM method on my server as the total downtime is only as long as it takes to do "zmcontrol stop; zmcontrol start"

  7. #7
    Join Date
    Feb 2007
    Location
    Portland, OR
    Posts
    1,147
    Rep Power
    10

    Default

    The MySQL database is within the Zimbra directory, so no you don't need to back it up separately.

  8. #8
    Join Date
    Oct 2009
    Posts
    13
    Rep Power
    6

    Default

    Thanks a lot.
    May I have a conclusion as below...

    Backup procedure.
    1) Shutdown Zimbra
    2) copy whole Zimbra folder (/opt/zimbra) to another location (e.g. /Zimbra-backup)
    3) Start Zimbra

    Restoration.
    1) shutdown zimbra
    2) move the old (or bad) zimbra (/opt/zimbra) to another location (e.g. /zimbra-old)
    3) copy the backup to /opt/zimbra
    4) start zimbra

    Am I right?
    Thanks

    Quote Originally Posted by ArcaneMagus View Post
    The MySQL database is within the Zimbra directory, so no you don't need to back it up separately.

  9. #9
    Join Date
    Feb 2007
    Location
    Portland, OR
    Posts
    1,147
    Rep Power
    10

    Default

    Yes that would work. You might also want to take a look at Open Source Edition Backup Procedure - Zimbra :: Wiki

Similar Threads

  1. Upgrade to ZCS 5.10
    By blozancic in forum Installation
    Replies: 0
    Last Post: 10-21-2008, 09:03 AM
  2. [SOLVED] parts_decode_ext error
    By jsabater in forum Administrators
    Replies: 7
    Last Post: 10-13-2008, 08:24 AM
  3. zimbra install with perpetually broken logger/stats
    By jptech in forum Installation
    Replies: 8
    Last Post: 09-29-2008, 03:33 PM
  4. Replies: 31
    Last Post: 12-15-2007, 09:05 PM
  5. 3.1 on FC4 problems
    By cohnhead in forum Installation
    Replies: 8
    Last Post: 05-26-2006, 12:16 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
  •