Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> rman backups without a catalog
I am trying to set up rman to do hot backups without a catalog
My script is shown below. My rationale for backing up the control file
outside of rman is that I need to have a control file in place in order
for rman to know where to look for the backup files to restore.
--------------Backup script -------------------------------------------
export ORACLE_BASE=/opt/oracle export BACKUP_DIR=/orabkup/$1/hot_copies export ORAENV_ASK=NO export ORACLE_SID=$1
echo " "
signon=`cat $ORACLE_BASE/maint/dba.ctl/dba.$1`
#
BASE_NAME=`date +$1_%y%m%d%H%M%S`
#
rman target $signon nocatalog <<EOF
run {
allocate channel ch1 type disk format '$BACKUP_DIR/${BASE_NAME}_1.rbk'; allocate channel ch2 type disk format '$BACKUP_DIR/${BASE_NAME}_2.rbk'; allocate channel ch3 type disk format '$BACKUP_DIR/${BASE_NAME}_3.rbk'; backup database; sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';}
gzip $BACKUP_DIR/${BASE_NAME}_1.rbk gzip $BACKUP_DIR/${BASE_NAME}_2.rbk gzip $BACKUP_DIR/${BASE_NAME}_3.rbk
#
# Backup the control file which now contains a record
# of this backup.
#
file=`date +$1_control.%y%m%d.bak`
sqlplus $signon <<EOF
alter database backup controlfile to '$BACKUP_DIR/${file}';
exit
EOF
#
------------------------end of backup script ----------------------------------------
Using the three backup files and one backup control file, I am able to restore the database to another machine using the following procedure:
Is there a better way to do this?
Thanks,
Peter Schauss
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Tue Jul 13 2004 - 12:43:18 CDT
![]() |
![]() |