Results 1 to 7 of 7

Thread: backup is bigger

  1. #1
    Join Date
    Oct 2007
    Location
    Carcavelos, Lisbon
    Posts
    61
    Rep Power
    8

    Default backup is bigger

    I did a backup like this:
    /etc/init.d/zimbra stop
    cp -rv /opt/zimbra /opt/backzimbra

    Then if I run the command du -h /opt/zimbra I have 19G, and du -h /opt/baczimbra I got 61G.
    Is this normal? can anyone explain me why is that?
    The difference is in the size of the store.

  2. #2
    Join Date
    May 2008
    Location
    South Dakota
    Posts
    81
    Rep Power
    7

    Default s/cp/rsync/

    Things change, and cp can't accomodate it. rsync is a better option in this case. There's a wiki about zimbra backup scripts but here's the jist of it.

    1. You want to perform a sync while the system is still online. This reduces downtime. Once that is done, bring the system offline, sync again, and bring it back up.

    2. You want rsync -auz --delete /opt/zimbra/ /opt/backzimbra/
    Make sure you keep the trailing slashes. This allows rsync to delete things that have been deleted from your source destination.

    Check out the Wiki, I've modified my script a fare deal so it probably won't help you much.

  3. #3
    Join Date
    Oct 2007
    Location
    Carcavelos, Lisbon
    Posts
    61
    Rep Power
    8

    Default

    Ok. I think you are talking about this command: rsync -avrlHKpogDt /opt/zimbra /opt/zimbra.bak
    right?

  4. #4
    Join Date
    May 2008
    Location
    South Dakota
    Posts
    81
    Rep Power
    7

    Default Way off base

    Here's my script...
    #!/bin/bash
    #set -x

    # Author: Michael Lustfield
    # Date: Jul 8, 2008
    # Description: This script is used to perform
    # backups of Zimbra.

    # Perform hot backup of services
    rsync -aHK --delete /opt/zimbra/ /opt/zimbra-bak/current

    # Bring services off-line
    sudo -u zimbra /opt/zimbra/bin/zmcontrol stop
    sleep 15

    # Perform cold backup of services
    rsync -aHK --delete /opt/zimbra/ /opt/zimbra-bak/current

    # Bring services on-line
    sudo -u zimbra /opt/zimbra/bin/zmcontrol start

    # Archive current copy
    tar -czf /opt/zimbra-bak/archives/zimbra-$(date +%F).tgz /opt/zimbra-bak/current/*

    # Delete old archives
    find /opt/zimbra-bak/archives/ -mtime +7 -exec rm {} \;

    exit

  5. #5
    Join Date
    Aug 2008
    Location
    St Pete FL USA
    Posts
    392
    Rep Power
    7

    Default

    Silly question: if you're going to do a cold backup anyway, why do the hot one in the same script?

    And you do realize that the hot one may have internal phase-inconsistency problems, possibly fatal ones, right?
    Jay R. Ashworth - ZCS 6.0.9CE/CentOS5 - St Pete FL US - Music - Blog - Photography - IANAL - IAAMA
    Try to Ask Questions The Smart Way -- you'll get better answers.

    Put your product and version in your profile/signature - All opinions strictly my own, even though I have an employer these days.
    If you [SOLVE] something, please tell everyone how for the archives
    And, please... read what people write, and answer the questions they asked, not the ones they didn't.

  6. #6
    Join Date
    May 2008
    Location
    South Dakota
    Posts
    81
    Rep Power
    7

    Default Rhetorical Question

    Quote Originally Posted by Baylink View Post
    Silly question: if you're going to do a cold backup anyway, why do the hot one in the same script?

    And you do realize that the hot one may have internal phase-inconsistency problems, possibly fatal ones, right?
    I do this because I feel taking my server off-line for even the time I do is bad enough. I do it at 5am. If I were to do it all at once, this would be an even greater down time.

    It's true that the hot sync alone would be basically worthless in every aspect in the term of a backup. However, the cold sync afterward cleans up the hot backup. Notice, I never directly move the hot sync location either, only package it.

    So, hot sync, bring things down, clean up the sync, bring things up, create an archive, get rid of old archives. I choose +7 because I do an external backup weekly.

    If you have ANY other questions, SEE THE WIKI!

  7. #7
    Join Date
    Oct 2007
    Location
    Carcavelos, Lisbon
    Posts
    61
    Rep Power
    8

    Default

    I did a full cold backup using rsync -avHK, and now dh -h give me the same amount of data, 20 GB. Took about 1h45m.
    Thanks a lot.

Similar Threads

  1. Replies: 658
    Last Post: 04-04-2014, 10:01 AM
  2. Per User Backup for FOSS edition
    By fdsadmin in forum Developers
    Replies: 33
    Last Post: 03-14-2013, 10:16 AM
  3. Keeping a backup server synced with live server
    By Q-Mike in forum Administrators
    Replies: 5
    Last Post: 04-11-2008, 02:40 PM
  4. My backup is getting too much bigger
    By danny.sierra@omtech.net in forum Administrators
    Replies: 2
    Last Post: 12-13-2007, 08:53 AM
  5. FYI: ZCS NE backup to fuse/sshfs mount, worked.
    By jagipson in forum Administrators
    Replies: 0
    Last Post: 09-28-2007, 07:37 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
  •