Home » RDBMS Server » Backup & Recovery » 97 backup using rman
97 backup using rman [message #69968] Mon, 25 March 2002 00:58 Go to next message
krishna
Messages: 141
Registered: October 1998
Senior Member
I did a consistent whole database backup. When the target database 'summer' was mounted, i executed this.
run
{
allocate channel t1 type disk;
allocate channel t2 type disk;

setlimit channel t1 kbytes 2097150;
setlimit channel t2 kbytes 2097150;

backup
incremental level 0
filesperset 5
database;

# now that the backup is complete, open the db.
alter database open;
}
The backup terminated without errors but i don't know where these backup are stored in my hard disk. Can u help?
Re: 97 backup using rman [message #69969 is a reply to message #69968] Mon, 25 March 2002 05:04 Go to previous message
Grant
Messages: 578
Registered: January 2002
Senior Member
Here is an example I use to backup one of my databases. You need the format command to tell it where to go or I beleive it puts it in the directory you are running rman from. Did you have access to MetaLink? Did you read the article I recommended (Maintaining RMAN Repository)? If you read this article it will answer your questions and you would not have to post so many questions here that would have been answered by the article. If you do not have access I will send it to you.

#!/bin/ksh
#===============================================================================
# rman_liveshop_full - glh - October 9, 2001
#
# Purpose : Perform full rman database backup on the LIVESHOP instance.
#
# Set up environment variables for database export
. $HOME/liveshop;
TODAY=$(date +%d%m%y-%H:%M )
SPWD=`cat $HOME/passwd/sys`
RPWD=`cat $HOME/passwd/rman`
DBA="oracle"
#-------------------------------------------------------------------------------
OUTF=$HOME/rman/rman_liveshop_full_${TODAY}.out
{ # output block
#-------------------------------------------------------------------------------
rman <<END
connect catalog rman/$RPWD@rcvcat;
connect target sys/$SPWD@liveshop;
run {
# Hot database level 0 whole backup
allocate channel c1 type disk;
backup
incremental level 0
skip inaccessible
tag hot_db_bk_level0
# recommended format
format '/export/home/oracle/exports/backups/rman_backups/bk_%s_%p_%t'
(database include current controlfile);
sql 'alter system archive log current';
# backup all archive logs
backup
format '/export/home/oracle/exports/backups/rman_backups/al_%s_%p_%t'
(archivelog all delete input);
}
exit;
END
} >> $OUTF
if [[ $? != 0 ]]
then
echo . | mailx -s "RMAN Failed for the LIVESHOP Database at $TODAY" $DBA
else
echo . | mailx -s "RMAN Backup was Successful for LIVESHOP at $TODAY" $DBA
fi
exit
Previous Topic: RESTORE TABLES FRom BACKUP TAPE
Next Topic: COPYING CONTENTS FROM BACKUP
Goto Forum:
  


Current Time: Thu Apr 25 12:00:04 CDT 2024