Home » RDBMS Server » Backup & Recovery » Fix Rman Script
Fix Rman Script [message #181232] Fri, 07 July 2006 10:30 Go to next message
dryloop
Messages: 5
Registered: July 2006
Junior Member
Hi,

I need some one help me out.

I don't know how to get rid of those error message. Rman backup is successfully done.

Log file is attached.

Here is my script:

ORACLE_HOME=/opt/app/oracle/product/9.2.0
ORACLE_BIN=$ORACLE_HOME/bin
ORACLE_SID=XXX
export ORACLE_HOME ORACLE_BIN ORACLE_SID

BACKUP_DIR=/u1/oracle/bkup
ARCH_DIR=/opt/app/oracle/admin/XXX/arch
LOG=/home/oracle/rman_bkup.log

$ORACLE_BIN/rman target / nocatalog << EOF >$LOG
run{
back up
format '$BACKUP_DIR/datafile_%d_%t'
database;
sql 'alter system archive log current';
change archivelog all validate;
backup
archivelog all
format '$BACKUP_DIR/archfile_%d_%t';
change archivelog until time 'sysdate - 7 ' delete;
backup
current controlfile
format '$BACKUP_DIR/ctrlfile_%d_%t';
}
EOF

if [[ $? -eq 0 ]]
then
find $BACKUP_DIR -type f -mtime +1 -name \*file\* -print -exec rm {} \;
find $ARCH_DIR -type f -mtime +7 -name arch\* -print -exec rm {} \;
fi
  • Attachment: rman_bkup.log
    (Size: 18.81KB, Downloaded 1226 times)
Re: Fix Rman Script [message #181233 is a reply to message #181232] Fri, 07 July 2006 10:40 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
dryloop wrote on Fri, 07 July 2006 10:30

Hi,
$ORACLE_BIN/rman target / nocatalog << EOF >$LOG
run{
back up
format '$BACKUP_DIR/datafile_%d_%t'
database;
sql 'alter system archive log current';
change archivelog all validate;
backup
archivelog all
format '$BACKUP_DIR/archfile_%d_%t';
change archivelog until time 'sysdate - 7 ' delete;
backup
current controlfile
format '$BACKUP_DIR/ctrlfile_%d_%t';
}
EOF


The very first backup word has a space. And you said the backup was successful???
Re: Fix Rman Script [message #181258 is a reply to message #181233] Fri, 07 July 2006 12:28 Go to previous messageGo to next message
dryloop
Messages: 5
Registered: July 2006
Junior Member
oops, my bad. It's typal
The backup is completly done.
Re: Fix Rman Script [message #181260 is a reply to message #181233] Fri, 07 July 2006 12:34 Go to previous message
dryloop
Messages: 5
Registered: July 2006
Junior Member
Oh I see what you saying. I take back what I said about db complete done. It's not.
one word means millon. You are the rock!
Thanks again, You have a super day!

Previous Topic: when rman resync takes place ??
Next Topic: crash scenario
Goto Forum:
  


Current Time: Tue Apr 23 20:15:50 CDT 2024