Results 1 to 4 of 4

Thread: [SOLVED] Constant mta table corruption

  1. #1
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    47
    Rep Power
    7

    Default [SOLVED] Constant mta table corruption

    Hi.

    i have a weird problem with my zimbra installation, almost every night when i have done a full backup using my own script seen below, the mta table is corrupt, but I'm not sure it is the script causing this since it doesn't happen every night, it is just the last month it has been doing so to, kinda after the 5.0.4 upgrade come to think about it and i have been using the script longer than that.

    Is this related to zimbra version I'm running or just my installation and how can i check the cause of it?

    I'm running OSE Version 5.0.4 on Ubuntu 7.10

    Code:
    #!/bin/bash
    
    # This script will do various backups of Zimbra depending on wich you choose,
    # most of them are cold backups except the msg backup which hot copies the 'store'
    # folder for possible individual mail retrival. Be sure to change the variables below
    # to point to where you got the zimbra folder and where you want it to be backed up to.
    #
    # This script must be run as root or a user with equal privileges or it will not work.
    #
    # Usage: ZimBackup.sh full	- For full backup (Cold)
    #	 ZimBackup.sh diff	- For diffrential backup (Cold)
    #	 ZimBackup.sh msgfull	- For complete message backup (Hot)
    #	 ZimBackup.sh msgdiff	- For diffrential message backup (Hot)
    #
    # When you run this script via crontab be sure to add '> /dev/null 2>&1' at the end
    # of the script like below or the tar command will fail for no apparent reason.
    # 00 12 * * * ZimBackup.sh full > /dev/null 2>&1
    #
    # Bits and pieces was adopted from a script created by Daniel W. Martin, 9 Sept 2007
    # Free to use and free of any warranty!  Marcus Uddenhed, 3 feb 2008
    #
    # Last updated: 2008-03-09
    
    ZimInstPath=/opt
    ZimHome=zimbra
    ZimBackupPath=/opt/backup
    ZimTempPath=/opt/backup/tmp
    
    # Do not change anything below this line unless you know what you are doing
    
    pre_check() {
    # Check to see if the tmp folder exist, and create if not
    mkdir -p $ZimTempPath
    
    # Check which zimbra version that is installed, for recovery purpose 
    sudo -u zimbra $ZimInstPath/$ZimHome/bin/zmcontrol -v > $ZimTempPath/zimbra_version.txt
    }
    
    full_backup() {
    # Removing possible old zimbra backup folder
    rm -r -f $ZimTempPath/$ZimHome
    
    # Stopping Zimbra
    /etc/init.d/zimbra stop
    sleep 20
    
    # Backing up zimbra folder
    cp -rv $ZimInstPath/$ZimHome $ZimTempPath/
    
    # Starting Zimbra
    /etc/init.d/zimbra start
    
    # Compressing backup for space reduction
    tar -zcvf $ZimBackupPath/ZimBackupTypeFull_`date +%Y%m%d%H%M`.tar.gz -C $ZimTempPath $ZimHome zimbra_version.txt
    }
    
    diff_backup() {
    # Hot sync before shutdown on zimbra folder
    rsync -avHK --delete $ZimInstPath/$ZimHome $ZimTempPath/
    
    # Stopping Zimbra
    /etc/init.d/zimbra stop
    sleep 20
    
    # Cold sync of zimbra folder
    rsync -avHK --delete $ZimInstPath/$ZimHome $ZimTempPath/
    
    # Starting Zimbra
    /etc/init.d/zimbra start
    
    # Compressing backup for space reduction and removing unpacked folder
    tar -zcvf $ZimBackupPath/ZimBackupTypeDiff_`date +%Y%m%d%H%M`.tar.gz -C $ZimTempPath $ZimHome zimbra_version.txt
    }
    
    msgfull_backup() {
    # Removing possible old store backup folder
    rm -r -f $ZimTempPath/store
    
    # Make dir for hot sync
    mkdir -p $ZimTempPath/store
    
    # Hot sync of mailbox messages
    rsync -avHK --delete $ZimInstPath/$ZimHome/store/0 $ZimTempPath/store/
    
    # Compressing store folder for space reduction
    tar -zcvf $ZimBackupPath/ZimBackupTypeMsg_`date +%Y%m%d%H%M`.tar.gz -C $ZimTempPath store zimbra_version.txt
    }
    
    msgdiff_backup() {
    # Make dir for hot sync
    mkdir -p $ZimTempPath/store
    
    # Hot sync of mailbox messages
    rsync -avHK --delete $ZimInstPath/$ZimHome/store/0 $ZimTempPath/store/
    
    # Compressing store folder for space reduction
    cd $ZimTempPath
    tar -zcvf $ZimBackupPath/ZimBackupTypeMsg_`date +%Y%m%d%H%M`.tar.gz -C $ZimTempPath store zimbra_version.txt
    }
    
    case $1 in
    full)
    pre_check
    full_backup
    ;;
    diff)
    pre_check
    diff_backup
    ;;
    msgfull)
    pre_check
    msgfull_backup
    ;;
    msgdiff)
    pre_check
    msgdiff_backup
    ;;
    *)
    echo "Usage: ZimColdBackup.sh {full|diff|msgfull|msgdiff}"
    ;;
    esac
    // Marcus Uddenhed
    Systems Specialist
    openSUSE Ambassador in Sweden
    Visit my blogs at www.osource.se

  2. #2
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    Have you checked through your Log Files - Zimbra :: Wiki for any error messages relating to MySQL ?

  3. #3
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    47
    Rep Power
    7

    Default

    I will give it a try. Will start with the /var/log/zimbra.log and find my way from there.
    Systems Specialist
    openSUSE Ambassador in Sweden
    Visit my blogs at www.osource.se

  4. #4
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    47
    Rep Power
    7

    Default

    I have now been running the 5.0.5 version for a couple of week and have not had one mta table corruption yet so my conclusion is that it problably was something with 5.0.4, it alone or it in conjuction with my system setup.

    But i'm anyhow a bit happier now, since i can concentrate on other things than repairing the mta table.

    /soulskater
    Systems Specialist
    openSUSE Ambassador in Sweden
    Visit my blogs at www.osource.se

Similar Threads

  1. Daily mail report always reports "No messages found"
    By McPringle in forum Installation
    Replies: 42
    Last Post: 06-13-2011, 09:57 AM
  2. zimbra daily reports problem - mta table is empty
    By sine in forum Administrators
    Replies: 4
    Last Post: 09-26-2008, 12:32 AM
  3. raw_logs mysql table corruption - how to recover?
    By mrdini in forum Administrators
    Replies: 11
    Last Post: 12-20-2007, 12:45 PM
  4. Server Stats Cont...
    By DMRDave in forum Administrators
    Replies: 15
    Last Post: 02-16-2006, 01:16 PM
  5. Installation on FC3 under Xen
    By andreground in forum Installation
    Replies: 9
    Last Post: 11-14-2005, 10:29 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
  •