Page 22 of 66 FirstFirst ... 12202122232432 ... LastLast
Results 211 to 220 of 659

Thread: [SOLVED] Yet Another Backup Script for Community Version

  1. #211
    Join Date
    Dec 2009
    Posts
    12
    Rep Power
    5

    Default

    My apologies if this is a retread but the thread is 21 pages long...

    For a novice who may or may not have gotten this script working ("script.sh --INSTALL" appeared to function without error), what would be the ideal way to verify and test the backup and restore procedure before I implement this server?

  2. #212
    Join Date
    Dec 2009
    Posts
    29
    Rep Power
    5

    Default

    Hi - great looking script but I have a daft question - I want to backup the running data and then copy that backup file to a mounted windows box - this box has external data backup that's taken offsite each day and rotated. The setup is an 80GB system drive and then 500GB mirrored data drives with a separate LVM group - /opt is in it's own lv using 250 GB - I created a separate LV on this disk as the /tmp/fakebackup mapping. If the system grows enough I'll stick another HDD in the box and use that as a backup scratch and extend the /opt LV - does this sound like a resonable setup?

    I looked at the script and that all seems to be fine - I don't want to use the facility to split backups to a format for burning to dvds - is that what the TOO_MEDIA_DIR=/srv/backup/burn/ variable is for? In which case, is there a simple switch in the script to disable this as running fails at the check and it wants to create this directory.

    would appreciate any advice as this is my first zimbra build.

    sem

  3. #213
    Join Date
    Dec 2009
    Posts
    29
    Rep Power
    5

    Default Backup and config query

    deleted as double post. sorry
    Last edited by sem; 12-30-2009 at 12:15 PM. Reason: Double posting

  4. #214
    Join Date
    Sep 2008
    Posts
    46
    Rep Power
    7

    Default

    I am running v.5 on a few machines and they did not handle the new year well. I assume because the transition from week 52 to week 1 happened mid-week so there was no "FULL" file for week 1 when the diff backups were attempted on the 1st, 2nd, etc.

    JUST FYI for those hanging on to older versions of the script and in case this problem might still exist in v.7.

  5. #215
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    7

    Default

    Same with me. The BACKUPWEEK is set to `date +%W`. Using the ISO week option, +%V, may solve it, if your date command supports it. Looks like it hasn't changed in v.7.
    Last edited by LaFong; 01-03-2010 at 05:20 PM.

  6. #216
    Join Date
    Sep 2008
    Posts
    46
    Rep Power
    7

    Default

    I have two requests:

    1) could we put a version note at the top of the script? For example:
    Code:
    #!/bin/bash
    ## *** Info ***
    # VERSION: .0.7 released 12/23/2009
    # USAGE:    -h or --help for help & usage.
    #           -f or --full for Full backup.
    #           -d or --diff for Diff backup.
    #           -V or --version for version info.
    #           --INSTALL    for script install and setup.
    and, on that note, both the indicated version checks give curious output:
    Code:
    # sh zmbak_v.0.7.sh -V
    use -h or --help for assistance
    and

    Code:
    # sh zmbak_v.0.7.sh --version
    
    Version 1.02
    first published Feb 08
    
    Change Log March 08:
    - Use the su command insted if sudo to stop and start services
    - Using shutdown insted of stop with zmcontrol
    - DATE_VERSION.txt now contains date and version and is created with full backups
    - Built in some more checks
    - eMail notification on error
    - Documentation - Added more comments
    - Dar archive is now built from current dir
    - Stats hack to make sure stats is starting again
    - 260 more lines of code... and who knows how many bugs
    --V and --version give identical (even down to the seemingly wrong 1.02 version number) on v.0.5, by the way.

    2) could we stamp the log with the date, not just the time, of run? For example:
    Code:
    full Backup started at: 20:03
    -->
    Code:
    full Backup started at: Sun Jan  3 20:03:48 PST 2010
    Last edited by pebcomputing; 01-04-2010 at 12:49 AM.

  7. #217
    Join Date
    Sep 2008
    Posts
    46
    Rep Power
    7

    Default EMAILCC bugfix

    In version .0.7, the EMAILCC bug seems to still be an issue. Here is a proposal for a simple fix:

    1) In the section for "static variables and other setup", at about line 152, insert the following code which tests if EMAILCC is null or not, and if it is not null inserts the "-c " that is needed to indicate a cc recipient to the "mail" command:

    Code:
    # Set mail function CC address - if not null, add "-c" cmd switch
    if [ -n "$EMAILCC" ]; then
            EMAILCC="-c $EMAILCC"
    fi
    2) at every other occurrence of $EMAILCC (approx lines 160, 163, 865, and 867), remove the "-c " that precedes it.

    for example,
    Code:
    cat $LOG | mail -c $EMAILCC -s "Zimbra backup error on $HOSTNAME" $EMAIL
    becomes:
    Code:
    cat $LOG | mail $EMAILCC -s "Zimbra backup error on $HOSTNAME" $EMAIL
    Voila!

  8. #218
    Join Date
    Jan 2008
    Location
    Germany
    Posts
    83
    Rep Power
    7

    Lightbulb Version 0.8 of zmbak is out for testing!

    You can download v.0.8 from Home*-*Open Source Office Lösungen

    Thank you to pebcomputing for making this updated version of the script available!

    fix EMAILCC bug
    - make -V work as advertised
    - update version output for accuracy
    - use full date stamp in backup log rather than only time
    - add trailing / to default TO_MEDIA_DIR as advised in comment


    Please note the following:

    THIS SCRIPT IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    HOLDERS AND/OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
    BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
    AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
    THE USE OF THIS DOCUMENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    Please test before use and let us know if more fixing is needed.

    heinzg
    Motions of a day at work -

  9. #219
    Join Date
    Jun 2009
    Posts
    195
    Rep Power
    6

    Default

    If you want to backup to a remote host with different ssh port number (eg from 22 to 1090), what do you do in the code? because I have generated the key and try all sort of things but it is being denied access, which to me I think that is the reason. Because when I try a simple ssh without the -p option I am denied access but with the -p option, I am able to connect to the remote host.

    Thanks

  10. #220
    Join Date
    Jan 2008
    Location
    Germany
    Posts
    83
    Rep Power
    7

    Default

    Hi borngunners,

    A quick hack would be to go to line 825 (of version 0.8, that is)
    you should see:
    Code:
    scp -i /root/.ssh/id_rsa $CPNAME "$SSHUSER"@"$REMOTEHOST":"$REMOTEDIR"
    Change this to:
    Code:
     scp -P 1090 -i /root/.ssh/id_rsa $CPNAME "$SSHUSER"@"$REMOTEHOST":"$REMOTEDIR"
    Cheers
    Heinzg
    Motions of a day at work -

Similar Threads

  1. Zimbra Backup Script ... Small Problem
    By frankb in forum Administrators
    Replies: 12
    Last Post: 07-14-2008, 09:40 AM
  2. Debian - Upgrade from 4.5.6
    By magikman in forum Installation
    Replies: 1
    Last Post: 01-19-2008, 12:59 PM
  3. Backup script issues
    By SSS in forum Administrators
    Replies: 18
    Last Post: 12-03-2007, 09:56 AM
  4. 4.0.4 to 4.5.6 upgrade failed in network edition
    By chenthil in forum Administrators
    Replies: 1
    Last Post: 08-27-2007, 10:36 AM
  5. [SOLVED] Simple backup question...
    By dameron in forum Administrators
    Replies: 3
    Last Post: 08-25-2007, 10:36 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
  •