Override the OBSOLETE with KEEP Clause in RMAN backup

Override the OBSOLETE option with KEEP Clause in RMAN backup

Suppose you have configure the retention policy for the backup is 1 days then the backup is deleted after one with delete noprompt obsolete commands after 1 days.
If you want to override the policy you need to mention in backup command with keep clause as:

KEEP UNTIL TIME 'SYSDATE+10' -- for 10 days
KEEP FOREVER -- For forever time limit

Example:
Suppose you are using these followings commands as database backup and archive log back in one command. And retention is 1 days.
And you want to keep archive log backup more number of days like 5 days then you mention archive backup with KEEP clause to keep more than database backup.


---Keep archive log backup upto 5 days

crosscheck backup;
crosscheck archivelog all;
Backup database;
Backup keep until time 'sysdate+5' archivelog all;
backup current controlfile;
delete noprompt obsolete;
delete archivelog until time 'sysdate-5';

Change this KEEP option after backup as follows:

change backup tag full_archive_backup01 keep until time 'sysdate+182';

change backup tag full_archive_backup01 nokeep;

Error
RMAN-06516: time specified in KEEP UNTIL clause must be after today

Cause:
Following Error occurred when you mention sysdate – 5 in command when you execute.

Solution:
It explain keep expire data above the today date means sysdate+5 otherwise use change command for nokeep backup option if you donot need backup.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.