Results 1 to 3 of 3

Thread: Freshman again!

  1. #1
    Join Date
    Jan 2002
    Posts
    165

    Unanswered: 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

  2. #2
    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

    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

  3. #3
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •