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: Perl Script for Cold Backup

Re: Perl Script for Cold Backup

From: Ron Reidy <ron_at_indra.com>
Date: Fri, 12 Oct 2001 08:35:33 -0600
Message-ID: <3BC6FFB5.C5212F6B@indra.com>


Greg Skouby wrote:
>
> Hello,
>
> I have inherited a database server that
> has been in production for the past 5 months
> with absolutely no backup scheme in place!!
> Also, the database has not been shutdown for that
> 5 month period.
>
> So, being that the application is a 9-5 operation
> and the database is running in NOARCHIVELOG mode
> I thought that the best way to backup this thing
> was to take the database offline, copy the 60 gigs
> to disk, start the database back up, then dump the
> copied 60 gigs to tape. Sound decent?
>
> What about the following PERL script?
> (The server is running 8.1.6 on Redhat 6)
>
> #!/usr/local/bin/perl5
>
> # This is the part that was still going when I got to work:
> system("su - oracle -c '/usr2/oracle/bin/dbshut abort' > /dev/null");
> system("su - oracle -c '/usr2/oracle/bin/dbstart restrict' > /dev/null");
> system("su - oracle -c '/usr2/oracle/bin/dbshut normal' > /dev/null");
> system("/bin/cp /usr2/oradata /usr2/backup/");
> system("su - oracle -c '/usr2/oracle/bin/dbstart' > /dev/null");
>
> ## I will schedule a dump with the BRU Pro software that we have
> ## in accordance to how long this script takes.
>
> Does anybody see any pitfalls with my scenario/situation?
> Feedback appreciated. Thanks!

Why al the ups and downs? Just shut down, perform the necessary backup and startup.

-- 
Ron Reidy
Oracle DBA
Reidy Consulting, L.L.C.
Received on Fri Oct 12 2001 - 09:35:33 CDT

Original text of this message

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