need command to delete previous days backup instead of obselete
i have shell script which takes back up and delete based on obselete.
rman target / <
backup database plus archivelog all delete input;
delete no prompt obselete;
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
delete noprompt backup of database compleyed before 'sysdate-no'
one more question ,
from shell script how do i spool the output log to a directory for rman
Last edited by prodadmin; 11-19-2008 at 10:04 AM.
you can use spool command in rman.
like if you want to spool o/p in specific dir.
1) SPOOL LOG TO '/specific_dir/your_log_file';
2) rman backup commands
3) spool off;
btw delete noprompt backup of database completed before 'sysdate-1' is not deleting backups on standby.
i take backup of archivelogs only on standby ..
is there different command i need to use
Originally Posted by prodadmin
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
Last edited by hrishy; 11-20-2008 at 05:24 AM.
Click Here to Expand Forum to Full Width