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: Online Backup Script

Re: Online Backup Script

From: spencer <spencerp_at_swbell.net>
Date: 2000/05/11
Message-ID: <1OrS4.154$kd3.6007@news.swbell.net>#1/1

ditto to John's comment about putting each tablespace into backup mode separately.

but i disagree with John's implementation of the required OS commands (i.e. tar) from within svrmgrl. i can't come up with an easy way to check the status or output of the host command or implement conditional logic, like i can in the shell script. my hot backup script invokes svrmgrl several times...

you don't need either of the "checkpoint" statements, since the log switches will
perform checkpoints anyway.

and you don't need the first "archive log all", it's unnecessary... (unless someone knows a good reason that it should be there.)

i "end backup" of each tablespace before the final "log switch". after this log switch (in my hot backup script) the script sleeps for sixty seconds to give the system time to archive the log file...

i need to research the "alter system archive log all" statement to see if that statement actually "blocks" until ARCH completes its work... that would allow me to remove the "sleep 60" from my script.

your outline looks to be on the right track.

"John van der Steen" <steenjoh_at_iquip.nl> wrote in message news:8fckf3$25s2$1_at_buty.wanadoo.nl...
> Hi Fender,
>
> You might want to apply another approach.
>
> The meaning of alter tablespace .... begin backup
 ............... end backup
> is to shorten the period of time a tablespace is offline.
> When you now put all tablespaces in backup mode this will
 increase the
> offline period for a tablespace.
>
> What you should consider is:
>
> alter tablespace system begin backup;
>
> host tar -vcf /dev/rmt/1mn systemdatafile
>
> alter tablespace system end backup;
>
> alter tablespace data1 begin backup;
>
> host tar -vcf /dev/rmt/1mn datadatafile
>
> alter tablespace data1 end backup;
>
> etc.....
>
> This reduces tablespace offline time. And users can go on
 working like
> nothing is going on.
>
> Greetings,
>
> John
>
>
>
>
> Fender <nospam.efender_at_ix.netcom.com> schreef in berichtnieuws
> 8fc4ct$i42$1_at_slb2.atl.mindspring.net...
> > I'm creating my first online (hot) backup script and have a
 couple
> > questions. The basic format of the script is:
> >
> > --- begin
> > svrmgrl <<EOD
> > connect internal
> > alter system checkpoint;
> > alter system switch logfile;
> > alter system archive log all;
> >
> > alter tablespace system begin backup;
> > alter tablespace rbs begin backup;
> > alter tablespace user begin backup;
> > exit
> > EOD
> > # tar to DLT with no rewind
> > tar -vcf /dev/rmt/1mn <datafile list>
> >
> > svrmgrl <<EOD
> > connect internal
> > alter system checkpoint;
> > alter system switch logfile;
> > alter system archive log all;
> >
> > alter tablespace system end backup;
> > alter tablespace rbs end backup;
> > alter tablespace user end backup;
> > exit
> > EOD
> > # tar to DLT with append & rewind
> > tar -vrf /dev/rmt/1m <control file list> <archive log dir>
> > --- end
> >
> > I'll add error checking and logging later, but does the
 basic format look
> > OK? Are the checkpoint, switch logfile and archive log all
 good practice,
> > or unnecessary? Any feedback is appreciated.
> >
> > Thanks,
> >
> > Eric
> > nospam.efender_at_ix.netcom.com
> > remove nospam to reply via e-mail
> >
> >
>
>
>
Received on Thu May 11 2000 - 00:00:00 CDT

Original text of this message

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