Re: Cold Backup Script

  • From: Thomas Fox <belvdr@xxxxxxxxx>
  • To: cemail_219@xxxxxxxxxxx, oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 1 Nov 2005 10:50:19 -0800 (PST)

Well, I cannot send you an entire script, but if you go into SQL*Plus, you can
use:

sqlplus -S '/ as sysdba' <<-ENDSQL
spool files2backup.txt
select name from v\$datafile;
select name from v\$controlfile;
select member from v\$logfile;
select name from v\$tempfile;
spool off
exit
ENDSQL

to get the files.  Then use a while loop to copy each file to a particular
location:

cat files2backup.txt | while read line ; do
  cp $line /var/opt/backup
done

Tom

--- "J. Dex" <cemail_219@xxxxxxxxxxx> wrote:

> Does anyone have a cold backup script for 9i that they would be willing to 
> send to me that is in
> Korn shell and copies files/backups to disk and then compresses the files?  
> I just need something that can be quickly setup and run a couple of times.  
> I would really appreciate it.  The OS is AIX.
> 
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it's FREE! 
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> 
> --
> //www.freelists.org/webpage/oracle-l
> 
> 
> 



        
                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
--
//www.freelists.org/webpage/oracle-l


Other related posts: