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

Thread: how to take backup in open source edition

  1. #1
    chandu is offline Elite Member
    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
    mmorse's Avatar
    mmorse is offline Moderator
    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-26-2008 at 12:40 AM.

  3. #3
    chandu is offline Elite Member
    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
    Rich Graves is offline Outstanding Member
    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
    chandu is offline Elite Member
    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
    dwmtractor's Avatar
    dwmtractor is offline Moderator
    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
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    719
    Rep Power
    9

    Default

    You should be able to do the "zmcontrol start" immediately after the rsync, reducing the downtime.

    If you're using SAN or LVM snapshots rather than rsync, then downtime should only be about two minutes (including the time to restart zimbra). LVM management is well outside the scope of Zimbra, and details vary wth your operating system, but definitely worth learning.

  8. #8
    chandu is offline Elite Member
    Join Date
    Dec 2007
    Posts
    445
    Rep Power
    7

    Post

    Thanks for your wonderfull suggestion

    If I want to take backup, of only mailboxs of the user or single mailbox of particular user

    then

    what are the steps to do that in opensource edition and what are steps,
    to restore them.



    Regards,
    chandu

  9. #9
    dwmtractor's Avatar
    dwmtractor is offline Moderator
    Join Date
    Jul 2007
    Location
    San Jose, CA
    Posts
    1,027
    Rep Power
    10

    Default

    There is no practical way to backup and/or restore a single mailbox in open source. That's one of the things that motivates people to spring the $$$ for a NE license.

    It's kinda clumsy (actually VERY clumsy), but it would probably be possible to use an IMAP client and have the user keep copies of his IMAP folders on the local machine, but at the server level your only backup options are backup and restore of the entire install.

    It's probably more helpful to think of FOSS backup methods as disaster recovery methods than just data backup in the classic sense, although the data are fully backed up as well. If it came down to you needing to restore a single user's mailbox without disturbing everyone else's mail, the only real way I can see doing that would be to restore your backup onto a test box, give it different hostname and ip address AFTER install, and then use an IMAP client to pull the data off of box B and onto box A. That's not easy--but again, if this functionality is crucial to your organization it's probably time to consider NE.

    Cheers,

    Dan

  10. #10
    dwmtractor's Avatar
    dwmtractor is offline Moderator
    Join Date
    Jul 2007
    Location
    San Jose, CA
    Posts
    1,027
    Rep Power
    10

    Exclamation Vote on FOSS hot backups

    What I said in the post above is still true, but it could change. If you want to see it change, hit this thread and vote!

    Vote: Hot Backups for FOSS?

    Dan

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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, 01: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
  •