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

Perl Script for Cold Backup

From: Greg Skouby <gskouby_at_sitesnow.com>
Date: 12 Oct 2001 07:18:54 -0700
Message-ID: <788a7a61.0110120618.747dea2d@posting.google.com>


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! Received on Fri Oct 12 2001 - 09:18:54 CDT

Original text of this message

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