Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Question about BACKUP-script

Re: Question about BACKUP-script

From: <rensimo_at_my-deja.com>
Date: 2000/04/07
Message-ID: <8ckand$59m$1@nnrp1.deja.com>#1/1

In article <8chp4f$2d6$1_at_cyan.nl.gxn.net>,   "Victor Oosterbaan" <sono_at_sono.myweb.nl> wrote:
> Hi there !!
>
> I got a little question;
>
> My pruduction-server has been installed by
 another company, and i only
> started working with it since 3 months ago..
 They also wrote a backup-script
> for oracle and unix. I have NO idea if it's a
 good backup it's doing, so
> could you smart guys look into this to see if
 it's O.K. ???
> Thanx !!!
>
> ViC
> The backup-script;
>
> #!/bin/sh
> #
> # /etc/do_backup - Make a backup
> #
> TMPLOG=/tmp/backup1.tmp
> TMP2LOG=/tmp/backup2.tmp
> BACKUPLOG=/usr/adm/backup.log
>
> cd /
> echo
> "===============================================



> " > $TMPLOG
> echo "==============[ STARTING BACKUP RUN ON:
 `date +'%a %d-%b-%y
> %H:%M'` ]==============" >> $TMPLOG
> echo
> "===============================================


> " >> $TMPLOG
>
> echo "------------------------------------------
 ------------" >> $TMPLOG
> echo " ==> NOW STARTING ORACLE EXPORT" >>
 $TMPLOG
> su - oracle8 -c "exp system/manager

 FILE=/oracle/daily_export.dmp OWNER=edge
> > $TMP2LOG 2>&1"
> cat $TMP2LOG >> $TMPLOG
> echo " ==> FINISHED ORACLE EXPORT `date
 +'%a %d-%b-%y %H:%M'`" >>
> $TMPLOG
> echo "------------------------------------------
 ------------" >> $TMPLOG
> echo " ==> NOW STARTING UNIX BACKUP" >>
 $TMPLOG
> tar cvf /dev/rmt0 . > /dev/null 2>> $TMPLOG
> echo " ==> FINISHED UNIX BACKUP `date
 +'%a %d-%b-%y %H:%M'`" >>
> $TMPLOG
>
> # Yep, device-files aren't backupped !
> #
> grep -v "0511-180" $TMPLOG >> $BACKUPLOG
> rm $TMPLOG
> rm $TMP2LOG
>
> # Eject the tape
> mt offline
> # Change backuplog owner
> chown edge:edge $BACKUPLOG
>
> # EOF
>
>

Ok,

So you got a script to perform backup. Have you ever thought if disaster strikes? In that case you have to perform a restore from your backup. If you don't know if you're backup is a good one then you can know for sure that it's a really bad one (because there's no way you can restore this).

In this case the backup is a full export of your database. If a media failure occurs on your system then you lose all your data from the last time of the backup.

I can only suggest to start reading the backup and recovery manual and do some testing.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Apr 07 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US