Page 53 of 66 FirstFirst ... 343515253545563 ... LastLast
Results 521 to 530 of 659

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

  1. #521
    aarat is offline Active Member
    Join Date
    Aug 2011
    Posts
    32
    Rep Power
    3

    Default

    [/CODE]Diffs require the Full, or will fail. It is not finding the Full where it is expecting to find it. Did you move it? What is the path to your Full file? The script is looking for it in /Backup/zimbra_dars.[/QUOTE]

    Files are at the same location, I am also able to see the path. However I got this resolved by removing all previous backups and then creating new one.

    Now I am facing issue is for zimbra's crontab. I am unable to see zimbra's crontab. I can see blank crontab in zimbra user. Any tips how can I restore it??
    Zimbra Version 8.0.1_G.A._5438 (build 20121105164416) running on ubuntu 10.04 x64

  2. #522
    LaFong is offline Advanced Member
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    6

    Default

    Quote Originally Posted by aarat View Post
    Files are at the same location, I am also able to see the path. However I got this resolved by removing all previous backups and then creating new one.
    Yes, you are not allowed to have more than one Full in the backup directory, [SOLVED] Yet Another Backup Script for Community Version
    Now I am facing issue is for zimbra's crontab. I am unable to see zimbra's crontab. I can see blank crontab in zimbra user. Any tips how can I restore it??
    The script disables Zimbra's crontab during backup, then restores it when done. It is saved in "$ZM_HOME"crontab.org, usually /opt/zimbra/crontab.org. Restore it by
    Code:
        crontab -u zimbra /opt/zimbra/crontab.org

  3. #523
    kazooless is offline Loyal Member
    Join Date
    Mar 2009
    Posts
    89
    Rep Power
    6

    Default

    The script edits seem to have corrected the problem. It seems that it is having trouble shutting down the services every night so it is using that extra function. It does worry me that this has been working fine for almost a year and now all of the sudden the services don't shut down properly. At least the backup is working again.

    THANKS!!!

  4. #524
    kazooless is offline Loyal Member
    Join Date
    Mar 2009
    Posts
    89
    Rep Power
    6

    Default Disable burn directory??

    I have another question now.

    How can I disable the burn directory procedure? I have it copy automatically to another computer over the network, so I don't need the extra copy on the mail server itself.

    I tried to run the --install again on the script in the /root/bin directory, but it wouldn't let me. I'm not even sure that is an option it gives you, and I've also got the script customized now, so I'm not sure re-running install would be a good idea.

    Thanks,

    Kazooless

  5. #525
    LaFong is offline Advanced Member
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    6

    Default

    Quote Originally Posted by kazooless View Post
    The script edits seem to have corrected the problem. It seems that it is having trouble shutting down the services every night so it is using that extra function. It does worry me that this has been working fine for almost a year and now all of the sudden the services don't shut down properly. At least the backup is working again.
    It's probably nothing serious. If you're worried, try a manual shutdown of Zimbra. Then look in the tail of the logs in /opt/zimbra/log.

  6. #526
    LaFong is offline Advanced Member
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    6

    Default

    Quote Originally Posted by kazooless View Post
    I have another question now.
    How can I disable the burn directory procedure? I have it copy automatically to another computer over the network, so I don't need the extra copy on the mail server itself.
    Do you want to skip dar creation altogether, and just use rsync? Dars are the means by which the script backs up a point-in-time. Without them, you cannot restore to a particular date/time using just the rsynced files (except for the _last_ point-in-time). If you are using different backup software on the other computer, which does fulls and incrementals, that would be a reason to skip dar creation. I personally do all 3.

    I tried to run the --install again on the script in the /root/bin directory, but it wouldn't let me. I'm not even sure that is an option it gives you, and I've also got the script customized now, so I'm not sure re-running install would be a good idea.
    Yeah, I wouldn't try that. There is no "no burn" option in the install procedure I'm aware of.
    Last edited by LaFong; 01-17-2012 at 11:01 AM.

  7. #527
    kazooless is offline Loyal Member
    Join Date
    Mar 2009
    Posts
    89
    Rep Power
    6

    Default

    in my backup folder, i have 3 subfolders: burn, fake_backup, zimbra_dars. I would like to keep the dars, but not the burn. It seems that the burn is a copy of the dars specifically for burning to an optical disc, right?

  8. #528
    LaFong is offline Advanced Member
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    6

    Default

    Quote Originally Posted by kazooless View Post
    in my backup folder, i have 3 subfolders: burn, fake_backup, zimbra_dars. I would like to keep the dars, but not the burn. It seems that the burn is a copy of the dars
    It's not a copy. It's the dars from the previous weeks.
    specifically for burning to an optical disc, right?
    Yes. That's why ARCHIVESIZE is 4GB by default. It seems you are wanting to keep the functionality, but rename things. That's what I did.
    Code:
    SYNC_DIR=/backup/sync/  # intermediate dir for hot/cold syncs. must have at least as much free space as ZM_HOME consumes
    ARCHIVEDIR=/backup/current/ # where to store final backups
    TO_MEDIA_DIR=/backup/previous/
    Since I'm not burning to disc, I changed ARCHIVESIZE. I only get 1 dar file for a full backup.
    Code:
    ARCHIVESIZE="110000M"   # storage media size, for full-backup archiving
    Then, I delete dars in the "previous" directory on every Full, just keep 2 weeks worth. You can do it the complicated way, based on file name:
    Code:
    @@ -622,7 +654,42 @@
                     fi
                 done
            fi
    +# Remove previous week of backups from 2 weeks ago. 
    +               TWO_WEEKS_AGO=$(expr "$BACKUPWEEK" \- 2)
    +               LASTYEAR=$(expr `date +%Y` \- 1)
    +               FINALWEEK=`date -d "$LASTYEAR"1228 +%V`
    +        if [ "$BACKUPWEEK" -eq "1" ] ; then
    +                   TWO_WEEKS_AGO=$(expr "$FINALWEEK" \- 1)
    +               elif [ "$BACKUPWEEK" -eq "2" ] ; then
    +                       TWO_WEEKS_AGO="$FINALWEEK"
    +               elif [ "$TWO_WEEKS_AGO" -lt "10" ] ; then
    +                       TWO_WEEKS_AGO=0"$TWO_WEEKS_AGO"
    +               fi
    +               TWO_WEEK_BACKUP=`ls -A -1 $TO_MEDIA_DIR | grep "$TWO_WEEKS_AGO" | grep "$BACKUPNAME" | cut -d _ -f1 | head -n1`
    +               if [ -z "$TWO_WEEK_BACKUP" ]
    +               then
    +                               echo
    +                               echo "No two-week old backups found"
    +                               echo
    +               else
    +                       echo
    +            echo "Two-week old backup found...old week= $TWO_WEEKS_AGO current week= $BACKUPWEEK"
    +            echo
    +            for i in `ls -A -1 "$TO_MEDIA_DIR""$TWO_WEEKS_AGO"_"$BACKUPNAME"*`
    +                do
    +                    rm $i
    +                    if [ "$?" -ne "0" ]
    +                    then
    +                        echo "Error during delete!"
    +                    else
    +                        echo "$i deleted"
    +                    fi
    +                done
    +            echo
    +               fi
         fi
    +
         # Checking for a backup file collisions. Creating Date and Marker file.
         CURRENTNAME1=`ls -A -1 "$ARCHIVEDIR""$ARCHIVENAME"*dar 2> /dev/null | head -qn1`
         if [ -f "$CURRENTNAME1" ]
    Or the easy way, based on file modification time:
    Code:
    @@ -622,7 +633,42 @@
                     fi
                 done
            fi
    +# Remove previous week of backups from 2 weeks ago. 
    +find $TO_MEDIA_DIR*$BACKUPNAME -mtime +14 -exec rm -fv {} \;
    
         fi
    +
         # Checking for a backup file collisions. Creating Date and Marker file.
         CURRENTNAME1=`ls -A -1 "$ARCHIVEDIR""$ARCHIVENAME"*dar 2> /dev/null | head -qn1`
         if [ -f "$CURRENTNAME1" ]

  9. #529
    kazooless is offline Loyal Member
    Join Date
    Mar 2009
    Posts
    89
    Rep Power
    6

    Default

    Thanks. I understand now. I'll do that.

    BTW, after I changed the script based on your suggestions, my log file has been including an attachment of some sort. It is about 14k in size. Any idea why?

  10. #530
    LaFong is offline Advanced Member
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    6

    Default

    Quote Originally Posted by kazooless View Post
    Thanks. I understand now. I'll do that.

    BTW, after I changed the script based on your suggestions, my log file has been including an attachment of some sort. It is about 14k in size. Any idea why?
    Dunno. What's the attachment called? Open the attachment in a text editor. Some email clients make an attachment based on message content or size. 14k sounds awful big.

Page 53 of 66 FirstFirst ... 343515253545563 ... LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Zimbra Backup Script ... Small Problem
    By frankb in forum Administrators
    Replies: 12
    Last Post: 07-14-2008, 08: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, 09:36 AM
  5. [SOLVED] Simple backup question...
    By dameron in forum Administrators
    Replies: 3
    Last Post: 08-25-2007, 09: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
  •