Results 1 to 4 of 4

Thread: Backups using rsync

  1. #1
    Join Date
    Nov 2005
    Rep Power

    Question Backups using rsync

    I've got a question for the forum...

    With regards to using rsync as a backup method for the open source version of Zimbra, I've noticed a number of different command-line arguments for rysnc beign used in examples, aside from the typical rysnc -av.

    So my question is:

    What are the best command switches to use... and why?

    OR really:

    What are the command switches for rsync YOU use... and why?

    Curious jimbo

  2. #2
    Join Date
    Jun 2006
    Corvallis, Oregon, USA
    Rep Power


    This is what I use on my backup server (separate from my email/zimbra server). I chopped out all the other things that I backup along with zimbra. This assumes that the zimbra server has a user named "backup" that's in the group of "zimbra".

    echo Unmounting...
    /bin/umount -v /mnt/zimbra
    /bin/sh /root/
    echo Mounting...
    /bin/mkdir -pv /mnt/zimbra
    /bin/mount -r -t cifs -o username=backup,password=password,ip=x.x.x.x,ro //mail/zimbra /mnt/zimbra
    /bin/mount -l
    /bin/mkdir -pv /backup/zimbra
    /usr/bin/rsync -av --partial --delete /mnt/zimbra/ /backup/zimbra/
    The "a" parameter if for archive mode so that it recurses the subdirectories, among other things. The "v" parameter turns on verbosity so I can see what it's doing when I run the script manually. The "partial" parameter keeps partially transfered files. The "delete" parameter deletes files that are no longer available on the source. My backup server is really a nightly synchronization server. I leave archival backups to a tape drive.

  3. #3
    Join Date
    Feb 2006
    Pune, India
    Rep Power


    After stopping Zimbra and checking that no Zimbra processes exist, as root, I use:

    rsync -avrlHKpogDt /opt/zimbra/ /backup/zimbra_bak_Sep_09_2006_17_56
    This allows me to maintain the permissions and symbolic links as well.

    Sep_09 ... is the current date and time accurate upto mins.

    /backup is a different hard-drive, on which I backup all that is useful, not just Zimbra.

    I do NOT do incremental backup. I maintain daily backups for 1 week. The amount of data would be approx. 1 GB today.

    If I want to restore, I simply do the following as root:

    mv /opt/zimbra /opt/zimbra_to_check
    mv /backup/zimbra_bak_Sep_09_2006_17_56 /opt/zimbra
    su - zimbra
    zmcontrol start

    Chintan Zaveri
    (Yet another ZIMBRAN!)

    "Dhundhne par Bhagwan bhi ..."

  4. #4
    Join Date
    Sep 2006
    477 Congress Street | Portland, ME 04101
    Rep Power

    Default "Outside The Box" OSS Backup Solution

    Although we just upgraded to the Network Edition, we backed up our previous OSS installation using a completely different method.

    First, we installed Zimbra in a VMware Server virtual machine. (I expect you now see where I am going with this...)

    Next, from the VMware host, we would just suspend the Zimbra virtual machine, copy the Zimbra virtual machine files to our desired backup location, and then resume the suspended Zimbra virtual machine.

    To restore the Zimbra virtual machine to a different host, you'll need a copy of VMware Workstation, because VMware Server won't create the new keys required when you move an existing VMware virtual machine and want to fire it up on a different VMware host.

    Our Zimbra installation was about 5GB, which didn't take too long to copy. And yes, although the Zimbra server was effectively "down" during this backup procedure, no shutdown/restart was required.

    This procedure gave us full, in-sync backups which we would then move off site.

    For on-site backups, we used VMware Server's "Snapshot" feature while the Zimbra server was running. We tested restoring twice and got no errors.

    One of the Zimbra employees pointed out that having a restorable backup means keeping ldap, mysql, cyrus, and postfix in sync. Having built a number of mail servers using these fine software packages, I can personally attest to the fact that doing a restore when these packages' stores are out of sync is a long, long process that is not assured to recover 100% of the data backed up.

    So, that's one of the key reasons why (after testing the OSS version to our satisfaction), we opted to buy the Network Edition.


Similar Threads

  1. cron pruning of backups
    By ThorGoLucky in forum Administrators
    Replies: 10
    Last Post: 11-13-2009, 01:20 AM
  2. Backups fail after workaround for bug 10827
    By warbirdcharles in forum Administrators
    Replies: 1
    Last Post: 07-17-2007, 12:07 PM
  3. old backups from 4.0.5_GA taking up too much space!
    By riccadus in forum Administrators
    Replies: 1
    Last Post: 04-04-2007, 12:58 AM
  4. How To Vet If Backups Are Working?
    By LMStone in forum Administrators
    Replies: 2
    Last Post: 03-19-2007, 06:38 PM
  5. 4.5 NE... can it read full backups from 4.0.x?
    By shanson in forum Administrators
    Replies: 3
    Last Post: 01-23-2007, 08:26 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