Results 1 to 10 of 11

Thread: how to take backup in open source edition

Hybrid View

  1. #1
    Join Date
    Dec 2007
    Posts
    445
    Rep Power
    7

    Post how to take backup in open source edition

    Hi

    I had setup a zimbra zcs 4.5 email server I am using this in production
    from few days i need to take backup of mails of the users

    How can I take backup

    I never taken a backup before please guide


    Regards,
    chandraprakash

  2. #2
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    About as simple as you can do:
    su - zimbra
    zmcontrol stop
    switch back to root
    ps aux | grep zimbra (kill -9 pid# of any remaining)
    mkdir /zcsbackuprsync
    rsync -avHK /opt/zimbra/ /zcsbackuprsync/zimbra
    mkdir /zcsbackuptars
    tar -zcvf /zcsbackuptars/backup.zimbra.version.date.time.tar.gz -C /zcsbackuprsync/zimbra .
    su - zimbra
    zmcontrol start
    If you want, you can run rsync -avHK --delete /opt/zimbra/ /zcsbackuprsync/zimbra while the box is still up, however you should run the command at least once when zimbra is stopped if you want to be able to smoothly restore.

    Including --delete on any rsync commands you run gets rid of files in the dest folder that don't exist at the source, this prevents old message & extraneous logfile bloat from building up overtime.
    If you have the space, by leaving the contents of /zcsbackuprsync rather than removing it you can run the backups much faster the 2nd time around.

    Plenty more info here: Open Source Edition Backup Procedure - Zimbra :: Wiki
    Last edited by mmorse; 01-25-2008 at 11:40 PM.

  3. #3
    Join Date
    Dec 2007
    Posts
    445
    Rep Power
    7

    Post

    Thanks for the above step,

    if I stop zimbra service at night time, is it will effect peformance to the
    customer.

    By executing the above step, is it will take whole zimbra backup ?? or i need
    to take mysql and ldap backup seperately

    what about the mysql and ldap backup

    what are the step to take mysql and ldap backup ????

    How can I restore them safely ??


    Regards,
    chandu

  4. #4
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    719
    Rep Power
    9

    Default

    mysql and ldap databases are stored in /opt/zimbra. As long as the service is stopped, then simple file copies/rsync/LVM or SAN snapshots will be consistent. But you do need the service stopped for at least as long as it takes to duplicate or snapshot the data.

    There is no FOSS answer for online backup. The closest you can get is to take the service down briefly, take a SAN or LVM snapshot (rsync is only viable if you have fewer than 100 users), restore service, and then back up the snapshot.

    Network Edition is not an entirely online backup, either -- during a full backup, each individual account is put into maintenance mode, preventing login or mail delivery to that specific account while that specific account's items are backed up.

  5. #5
    Join Date
    Dec 2007
    Posts
    445
    Rep Power
    7

    Post

    Thanks for the suggestion,

    su - zimbra
    zmcontrol stop
    switch back to root
    ps aux | grep zimbra (kill -9 pid# of any remaining)
    mkdir /zcsbackuprsync
    rsync -avHK /opt/zimbra/ /zcsbackuprsync/zimbra
    mkdir /zcsbackuptars
    tar -zcvf /zcsbackuptars/backup.zimbra.version.date.time.tar.gz -C /zcsbackuprsync/zimbra .
    su - zimbra
    zmcontrol start

    By executing the above step, is it will take whole zimbra backup ?? or i need
    to take mysql and ldap backup seperately (using open source edition)

    If Yes, then

    what are the steps to take mysql and ldap backup
    Is I need to stop zimbra services
    What are the steps to restore it bacup safely


    Regards,
    chandraprakash

  6. #6
    Join Date
    Jul 2007
    Location
    San Jose, CA
    Posts
    1,027
    Rep Power
    10

    Default

    Chandraprakash,

    As Rich pointed out above, as long as you have a standard Zimbra install--that is you haven't messed with trying to modify the locations of any of the necessary packages--this backup method gets ALL of the Zimbra stuff backed up. LDAP and MySQL are included in "all."

    In other words, having taken such a backup, if you do a clean install of the SAME VERSION of Zimbra, and then copy your backed up folders (the entire contents of /opt/zimbra) back onto that location on the new install, you'll have a fully-functioning machine, with the possible exception of needing to re-generate SSL certificates.

    As for having the backup down at night, it's not down for long, so if you choose your time carefully it should not adversely affect functionality. By doing the rsync once on live data before bringing down the services, you get the major changes (large adds and deletes within mailboxes), and the time down for the cold backup is minimized. In my relatively small server (35 users, 3-4 GB total mail store, compresses to 1.9 GB backup file) the server isn't down for more than 5 minutes (usually less) on the nightly backup.

    Dan

  7. #7
    Join Date
    Aug 2009
    Posts
    48
    Rep Power
    6

    Default tried backup

    hi
    i tried this backup .. it works... thanks a million


    but how would the restore work ?? what commands exactly??

    abby

Similar Threads

  1. [SOLVED] Backup on Open Source Edition
    By tapan.thapa in forum Administrators
    Replies: 34
    Last Post: 05-12-2008, 10:34 AM
  2. zimbra backup and restore - open source edition
    By kmuralidharan in forum Administrators
    Replies: 5
    Last Post: 08-23-2007, 08:37 AM
  3. [SOLVED] Is zimbra really open source product ?
    By hernad in forum Developers
    Replies: 3
    Last Post: 08-18-2007, 10:30 PM
  4. Error message in Server status
    By Max Ma in forum Installation
    Replies: 20
    Last Post: 04-19-2007, 08:55 AM
  5. M3 problem with shares
    By titangears in forum Users
    Replies: 4
    Last Post: 01-12-2006, 12:01 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
  •