[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] Ideal backup method



That looks good, now, your method, do you really shut down all the services
before performing it??

and I assume that you move the backup off the local server over a network
right? perhaps NFS??

David Smulsky
dave@xxxxxxxxxxxxxxxx
www.thehostworks.com
----- Original Message -----
From: <BSmith@xxxxxxxxxxx>
To: <cobalt-developers@xxxxxxxxxxxxxxx>
Sent: Thursday, January 23, 2003 11:11 AM
Subject: RE: [cobalt-developers] Ideal backup method


-----Original Message-----
From: David Smulsky
Subject: [cobalt-developers] Ideal backup method


I know this topic has been touched a number of times, but i've yet to see a
foolproof method.

I wanted to know what would be the best way to backup a RaQ550, so that in
case of complete system crash, I can just *rebuild* it with all the stuff
that was backed up without too much trouble..

I am building a fileserver box with massive storage, and would like it to
somehow be backed up to that(ftp, ssh, smbd etc..)..

Ideas, and methods please!! :-)

Thanks in advance
Dave
_______________________________________________

Since no one really wanted to help me, I put this together, it works pretty
well.  If anyone wishes to work on it with me, and make it to do more,
wonderful
but right now, this is what I have:  (it works).

#!/bin/bash

# This application will do FULL backups weekly
# and partial backups during the week.  Updating only files modified
# since the backup

RAQBAQDIR="/home/raqbaq"
RAQBAQDATADIR="/home/raqbaq/arch"
FULLBAQDATE="/home/raqbaq/arch/full-baq"

DOW=`date +%a`                          # Day of Week (Sun-Sat)
DOM=`date +%d`                          # Day of Month (1-31)
DMY=`date +%d%b%y`                      # Day, Month, Year

ADMINFILES="/root /home/.users"                         # All Admin Files
SITEFILES="/home/sites /home/.sites /home/spool"        # Site & User
Content
SYSFILES="/etc /var/db /var/named /usr/sausalito"       # Important System
Files
#DBFILES="/var/lib/mysql /var/lib/pgsql"                # Database
Information

COMPNAME="`hostname`"

TARSWITCH="cfp"         # Create File, Preserve File Info

# Make proper directories, check to see if files exist, etc.

if [ ! -e $RAQBAQDIR ]; then
        mkdir $RAQBAQDIR
fi

if [ ! -e $RAQBAQDATADIR ]; then
        mkdir $RAQBAQDATADIR
fi

if [ ! -e $FULLBAQDATE ]; then
        AFT=""
else
        AFT="--after-date `cat $FULLBAQDATE`"
fi

# Highly Recommended to shutdown a few apps before running.

#       1 - Admin Panel
#       2 - Web Server
#       3 - FTP Server
#       4 - mySQL Server
#       5 - Postgresl Server


if [ $DOM = "01" ]; then
        AFT=""
        echo $DMY > $FULLBAQDATE
        if [ -e $RAQBAQDATADIR/$COMPNAME-adminfiles-$DMY.tar ]; then
                rm $RAQBAQDATADIR/$COMPNAME-*-$DMY.tar $AFT
        fi
        tar $TARSWITCH $RAQBAQDATADIR/$COMPNAME-adminfiles-$DMY.tar $AFT
$ADMINFILES
        tar $TARSWITCH $RAQBAQDATADIR/$COMPNAME-sitefiles-$DMY.tar $AFT
$SITEFILES
        tar $TARSWITCH $RAQBAQDATADIR/$COMPNAME-sysfiles-$DMY.tar $AFT
$SYSFILES
        #tar $TARSWITCH $RAQBAQDATADIR/$COMPNAME-dbfiles-$DMY.tar $AFT
$DBFILES
elif [ $DOW = "Sun" ]; then
        AFT=""
        echo $DMY > $FULLBAQDATE
        if [ -e $RAQBAQDATADIR/$COMPNAME-adminfiles-$DOW.tar ]; then
                rm $RAQBAQDATADIR/$COMPNAME-*-$DOW.tar $AFT
        fi
        tar $TARSWITCH $RAQBAQDATADIR/$COMPNAME-adminfiles-$DOW.tar $AFT
$ADMINFILES
        tar $TARSWITCH $RAQBAQDATADIR/$COMPNAME-sitefiles-$DOW.tar $AFT
$SITEFILES
        tar $TARSWITCH $RAQBAQDATADIR/$COMPNAME-sysfiles-$DOW.tar $AFT
$SYSFILES
        #tar $TARSWITCH $RAQBAQDATADIR/$COMPNAME-dbfiles-$DOW.tar $AFT
$DBFILES
else
        if [ -e $RAQBAQDATADIR/$COMPNAME-adminfiles-$DOW.tar ]; then
                rm $RAQBAQDATADIR/$COMPNAME-*-$DOW.tar $AFT
        fi
        tar $TARSWITCH $RAQBAQDATADIR/$COMPNAME-adminfiles-$DOW.tar $AFT
$ADMINFILES
        tar $TARSWITCH $RAQBAQDATADIR/$COMPNAME-sitefiles-$DOW.tar $AFT
$SITEFILES
        tar $TARSWITCH $RAQBAQDATADIR/$COMPNAME-sysfiles-$DOW.tar $AFT
$SYSFILES
        #tar $TARSWITCH $RAQBAQDATADIR/$COMPNAME-dbfiles-$DOW.tar $AFT
$DBFILES
fi

if [ ! -e $FULLBAQDATE ]; then
        echo $DMY > $FULLBAQDATE
fi

chown admin:users -R /home/raqbaq

_______________________________________________
cobalt-developers mailing list
cobalt-developers@xxxxxxxxxxxxxxx
http://list.cobalt.com/mailman/listinfo/cobalt-developers