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: NeilC <neil-olops_at_NOSPAMbtinternet.com>
Date: 2000/05/11
Message-ID: <391A8EF1.3EFEF2A2@NOSPAMbtinternet.com>#1/1

I wouldn't bother with the alter system commands at the beginning. Also, do the alter system switch ... etc after doing the Alter tablespace ... end backup

It is considered better practice to do a single tablespace at a time, although it depends on the activity on your database, and whether you are using a version > 7.2 (I think its 7.2, but it was whenever Oracle introduced the alter database datafile '....' end backup command)

finally instead of exiting out of svrmgrl, just issue a host or ! followed by the tar command.

So, your base script would look like this :-

alter tablespace system begin backup;
alter tablespace rbs begin backup;
alter tablespace user begin backup;

!tar -vcf /dev/rmt/1mn <datafile list>

alter tablespace system end backup;
alter tablespace rbs end backup;
alter tablespace user end backup;

alter system checkpoint;
alter system switch logfile;
alter system archive log all;
exit
EOD
# tar to DLT with append & rewind
tar -vrf /dev/rmt/1m <control file list> <archive log dir> --- End

Hope that helps

regards

NeilC

Fender wrote:
>
> 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