Oracle Catalog Offline Backup Script
Enviroment: Solaris 10 64-bit Sparc
Oracle DB 10.2.0
/opt/oracle10g
$ cat coldbk.sh
cd /opt/oracle10g/bin
rman target / nocatalog <<@
shutdown immediate;
startup mount;
run {
allocate channel ch1 type
disk format='/data1/db-offline/bk_%s_%p_%t';
backup (database);
release channel ch1;
startup;
}
$ ./coldbk.sh
Recovery Manager: Release 10.2.0.4.0 - Production on Thu Jan 20 10:30:01 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: CATDB (DBID=927922687)
using target database control file instead of recovery catalog
RMAN>
database closed
database dismounted
Oracle instance shut down
RMAN>
connected to target database (not started)
Oracle instance started
database mounted
Total System Global Area 612368384 bytes
Fixed Size 2042528 bytes
Variable Size 209720672 bytes
Database Buffers 394264576 bytes
Redo Buffers 6340608 bytes
RMAN> 2> 3> 4> 5> 6> 7>
allocated channel: ch1
channel ch1: sid=157 devtype=DISK
Starting backup at 20-Jan-2011
channel ch1: starting full datafile backupset
channel ch1: specifying datafile(s) in backupset
input datafile fno=00005 name=/opt/oracle10g/oradata/catdb/rmants.dbf
input datafile fno=00001 name=/opt/oracle10g/oradata/catdb/system01.dbf
input datafile fno=00003 name=/opt/oracle10g/oradata/catdb/sysaux01.dbf
input datafile fno=00002 name=/opt/oracle10g/oradata/catdb/undotbs01.dbf
input datafile fno=00006 name=/opt/oracle10g/oradata/catdb/system2.dbf
input datafile fno=00004 name=/opt/oracle10g/oradata/catdb/users01.dbf
channel ch1: starting piece 1 at 20-JAN-11
channel ch1: finished piece 1 at 20-JAN-11
piece handle=/data1/db-offline-bk/bk_157_1_784117842 tag=TAG20120524T
103042 comment=NONE
channel ch1: backup set complete, elapsed time: 00:01:25
channel ch1: starting full datafile backupset
channel ch1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ch1: starting piece 1 at 20-JAN-11
channel ch1: finished piece 1 at 20-JAN-11
piece handle=/data1/db-offline-bk/bk_158_1_784117928 tag=TAG20120524T
103042 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:05
Finished backup at 20-JAN-11
released channel: ch1
database is already started
database opened
RMAN>
RMAN>
RMAN>
Recovery Manager complete.
$
No comments:
Post a Comment