need command to delete previous days backup instead of obselete
i have shell script which takes back up and delete based on obselete.
source .t45pdbprofile
echo
rman target / <
backup database plus archivelog all delete input;
delete no prompt obselete;
eof
exit
Can any one help me with a command deleting old backups based on time like sysdate -1 or sysdate -2 instead of saying delete obselete.the backups are on ASM
btw delete noprompt backup of database completed before 'sysdate-1' is not deleting backups on standby.
Thanks
You are running this command while connected to the standby database i assume
BTW a better comman would be something like
DELETE ARCHIVELOG ALL BACKED UP 2 TIMES TO SBT COMPLETED BEFORE ‘SYSDATE-7
You will be deleting those backups of archivelogs that have been already backed up.You are absolutely sure you have backups of archivelogs
You might also be interested in setting the following config on standby database
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE
This will enable automatic deletion of archived logs
on the standby database
(where backups are being taken)
that are outside of the retention period
or have already been backed up to tape,
if additional space is needed for new backups or archived logs
Bookmarks