If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Freshman again!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-28-03, 03:44
zkajfez zkajfez is offline
Registered User
 
Join Date: Jan 2002
Posts: 161
Freshman again!

My environment is ORA 8.1.7 on Win2000.
Through RMAN,i would like full backup of my closed database.
I created directory F:\Backup and want that dir containing my backups.
But,I cannot do backup before I del old backup because RMAN see file "backup".
How to say
DO BACKUP ( to "f:\backup)
IF SUCCESFULL DEL OLD BCK
Thanks,Zvonimir
Reply With Quote
  #2 (permalink)  
Old 01-28-03, 08:37
buckeye234 buckeye234 is offline
Registered User
 
Join Date: Sep 2002
Location: Ohio
Posts: 204
Re: Freshman again!

Unfortunately, I don't know how to make RMAN delete the old backup. But I am guessing that to have Oracle create a second backup in the same directory, you need a unique backup name. In the RMAN script on the backup command, you can add a 'format' clause with a %U. For example "backup database format sid_%U. The %U parameter guarantees uniqueness in the filename.

Think about the process of physically deleting the old backups. You'll need to remove the reference to that backup from the RMAN catalog. Look at $ORACLE_HOME/rdbms/demo/rman1.sh. I believe this script can be modified to delete the files and remove the entry from RMAN catalog.

HTH,
Patrick

Quote:
Originally posted by zkajfez
My environment is ORA 8.1.7 on Win2000.
Through RMAN,i would like full backup of my closed database.
I created directory F:\Backup and want that dir containing my backups.
But,I cannot do backup before I del old backup because RMAN see file "backup".
How to say
DO BACKUP ( to "f:\backup)
IF SUCCESFULL DEL OLD BCK
Thanks,Zvonimir
Reply With Quote
  #3 (permalink)  
Old 01-28-03, 14:34
marist89 marist89 is offline
Registered User
 
Join Date: Oct 2002
Location: greenwich.ct.us
Posts: 279
You'll have to control that from the OS. RMAN will return an error value (on Unix at least) of whether it succeeded or not. I backup to /u01/oraback/today and use logic similar to:

mv /u01/oraback/today /u01/oraback/yesterday
if (rman catalog .....) then
rm -rf /u01/oraback/yesterday
end if
__________________
Jeff Hunter
http://marist89.*************
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On