-
Overriding an RMAN backup set/piece
Hi DBA's,
I do take cold backups of my database (96G) using RMAN (to disk). My configuration parameter for disk storage is as follows:
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT $ORACLE_BASE/backup/db_name/%U';
This configuration creates a backup set with 3 pieces. Now, i need to set the configuration such that every time a backup is taken, it should override the present set/pieces & replace them with a new set/pieces, such that the old set/pieces would be automatically deleted.
Is there the possibility of doing this?
Please help...
Regards,
divroro12
-
I take it you're putting the old pieces of this backup on another device (tape), right?
rm before the script, or "host rm" inside the script
-
Yes, Ken i do move the old pieces to tape...
Regards,
divroro12
-
Cool. If my memory serves me right, the %U is manditory. So you'll end up with an unpredictable file name.
Some kind of hand-off between the tape backup routine and the disk backup script will need to be worked out. You don't want to delete the old backup unless your sure it's on tape. We have the sys admin's write a file when they're done. I check for the file before proceeding with the disk backup (which includes removing the old backup pieces first).
#! /bin/bash
if [ -f /rman/tape_done ]; then
rm /rman/*
else
echo "No tape_done file present, backup terminated"|mailx -s "Backup Error - Missing /rman/tape_done File" sysadmin@yourdomain.com,dba@yourdomain.com
exit
fi
... proceed with backup script here...
-
Thanks Ken, i could definitely use this script...
Regards,
divroro12
-
Hi
I think you would be better of with using something like this
rman> run {
DELETE NOPROMPT BACKUP OF DATABASE
your backup script
}
rather then using the unix shell script way of doing it
see the train diagram here
http://download-uk.oracle.com/docs/c...rcmsynta23.htm
regards
Hrishy
-
Just curious, why is it better?
-
Hi
If i understand the OP's requirement correctly then he wants to just keep only one backup .
with rm RMAN would never know what happened to the backup with delete RMAN knows that the backup has been deleted.with rm the OP has to to run crosscheck command sometime later to inform RMAN that the backup has been deleted and the catalog records have to be synced.
regards
Hrishy
-
Good point. Keeping the ctl file(s) and catalog sync'd is a good idea.
-
Thanks for your input guys...
Regards,
divroro12
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|