No question at this time
DBA Top 10
1 B. Vroman 14600
2 M. Cadot 11000
3 J. Schnackenberg 8200
4 T. Boles 7950
5 A. Kavsek 6200
6 M. Hidayathullah ... 2200
7 G. Lambregts 1100
8 T. P 1000
9 P. Wisse 900
10 B. Derous 500
10 . Lauri 500
10 R. Pattyn 500
About
DBA-Village
The DBA-Village forum
Forum as RSS
as RSS feed
Site Statistics
Ever registered users48286
Total active users1591
Act. users last 24h3
Act. users last hour0
Registered user hits last week242
Registered user hits last month1121
Go up

RMAN not deleting expired/obsolete backup sets
Next thread: getting a pdb in a shell script
Prev thread: LOST OCR ON RAC ENV

Message Score Author Date
Hi everyone, Having an issue with old RMAN Back...... Gary Campbell Oct 29, 2018, 10:43
What does your REPORT OBSOLETE show? Do you have ...... Score: 100 PtsScore: 100 PtsScore: 100 PtsScore: 100 PtsScore: 100 Pts Tim Boles Oct 29, 2018, 14:55
Hi Tim, Nope- when I run REPORT OBSOLETE; I get...... Gary Campbell Oct 30, 2018, 10:20
Gary, In your first posting you stated <i> T...... Score: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 Pts Tim Boles Oct 30, 2018, 15:32
Hi Tim, Thanks for getting back to me- The last...... Gary Campbell Oct 30, 2018, 16:11
Gary, I don't think that RMAN will delete folde...... Score: 100 PtsScore: 100 PtsScore: 100 PtsScore: 100 PtsScore: 100 Pts Tim Boles Oct 30, 2018, 16:27
Did you ever figure out what is going on?... Score: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 Pts Tim Boles Nov 02, 2018, 15:06
Hi Tim, Still investigating- out of curiosity...... Gary Campbell Nov 05, 2018, 11:22
Yes, that can be a factor. If the database forg...... Score: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 Pts Jan Schnackenberg Nov 06, 2018, 09:17
We run a level 0 backup every night (Database plus...... Gary Campbell Nov 06, 2018, 11:50
Hi Gary, as mentioned previously: RMAN will not...... Jan Schnackenberg Nov 06, 2018, 11:57
I've noticed the following error in the Alert Log ...... Gary Campbell Nov 06, 2018, 16:49
Well, that is a rather recent backup-piece (2018-1...... Jan Schnackenberg Nov 08, 2018, 09:20

Follow up by mail Click here


Subject: RMAN not deleting expired/obsolete backup sets
Author: Gary Campbell, Ireland
Date: Oct 29, 2018, 10:43, 20 days ago
Os info: Windows 2008 R2
Oracle info: 11g R2
Message: Hi everyone,

Having an issue with old RMAN Backupsets not being deleted as part of RMAN nightly backup, would greatly appreciate any input!

RMAN Parameters:

RMAN configuration parameters for database with db_unique_name <DATABASE> are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:\APP\PRODUCT\11.2.0\DBHOME_1\DATABASE\SNAPCFDATABASE.ORA';


RMAN Backup script (Executed nightly):

configure retention policy to redundancy 3;
configure default device type to disk;
configure controlfile autobackup on;

backup as compressed backupset database plus archivelog;

crosscheck backup;
crosscheck archivelog all;
delete noprompt expired backup;
delete noprompt expired archivelog all;
delete noprompt obsolete;



Any ideas? The backup completes successfully and running BACKUP SUMMARY and REPORT EXPIRED/OBSOLETE show the valid files.

TIA

Gary
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: RMAN not deleting expired/obsolete backup sets
Author: Tim Boles, United States
Date: Oct 29, 2018, 14:55, 20 days ago
Score:   Score: 100 PtsScore: 100 PtsScore: 100 PtsScore: 100 PtsScore: 100 Pts
Message: What does your REPORT OBSOLETE show? Do you have any files that are obsolete?

Regards
Tim
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: RMAN not deleting expired/obsolete backup sets
Author: Gary Campbell, Ireland
Date: Oct 30, 2018, 10:20, 19 days ago
Message: Hi Tim,

Nope- when I run REPORT OBSOLETE; I get:

"No obsolete backups found"
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: RMAN not deleting expired/obsolete backup sets
Author: Tim Boles, United States
Date: Oct 30, 2018, 15:32, 19 days ago
Score:   Score: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 Pts
Message: Gary,

In your first posting you stated

The backup completes successfully and running BACKUP SUMMARY and REPORT EXPIRED/OBSOLETE show the valid files


Have you checked the actual log file from the execution of the RMAN backup?

Your last command in your script should produce out put that either looks like:


RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 3
using channel ORA_DISK_1
no obsolete backups found


or



RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 3
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
------------------------------------------------------------------------
Archive Log 1 ..........<other stuff>........
Backup Set 1 ..........<other stuff>........
.
.
.



I know that the log file is probably to large to post here but you can email it to me if you want me to look at it.

timboles@hotmail.com

Regards
Tim
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: RMAN not deleting expired/obsolete backup sets
Author: Gary Campbell, Ireland
Date: Oct 30, 2018, 16:11, 19 days ago
Message: Hi Tim,

Thanks for getting back to me- The last command finds and deletes Archive Logs, Backupsets and Autobackups. The issue is that it doesn't identify and remove all the obsolete files/folders i.e. there are some left behind.


I wonder is it at all related to the order in which I crosscheck and remove Archive Logs/Backups?




Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: RMAN not deleting expired/obsolete backup sets
Author: Tim Boles, United States
Date: Oct 30, 2018, 16:27, 19 days ago
Score:   Score: 100 PtsScore: 100 PtsScore: 100 PtsScore: 100 PtsScore: 100 Pts
Message: Gary,

I don't think that RMAN will delete folders only the files.

If it is not deleting the files then either the files are not registered in the catalog/controlfile or it believes that the datafiles have not meet the retention period specified in the script (redundancy 3)....the backups for those files have a different retention period that has not been achieved.

I have never attempted it but you might be able to determine this by using the reporting / listing features in RMAN.

list backup like '<location of backup>;

Regards
Tim
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: RMAN not deleting expired/obsolete backup sets
Author: Tim Boles, United States
Date: Nov 02, 2018, 15:06, 16 days ago
Score:   Score: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 Pts
Message: Did you ever figure out what is going on?
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: RMAN not deleting expired/obsolete backup sets
Author: Gary Campbell, Ireland
Date: Nov 05, 2018, 11:22, 13 days ago
Message: Hi Tim,

Still investigating- out of curiosity, would the CONTROL_FILE_RECORD_KEEP_TIME parameter be a factor at all?

It is currently set to the default value of 7 days?

Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: RMAN not deleting expired/obsolete backup sets
Author: Jan Schnackenberg, Germany
Date: Nov 06, 2018, 09:17, 12 days ago
Score:   Score: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 Pts
Message: Yes, that can be a factor.

If the database forgets about backup-pieces before it considers them obsolete, it will not be able to delete them.

Depending on your backup frequency, this might be the case, or it might not. How often do you execute your backups? How old are the backup pieces that you think are obsolete?

Regards,
Jan
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: RMAN not deleting expired/obsolete backup sets
Author: Gary Campbell, Ireland
Date: Nov 06, 2018, 11:50, 12 days ago
Message: We run a level 0 backup every night (Database plus Archivelog)

Retention Policy: redundancy 3
Archivelog deletion policy: "BACKED UP 1 TIMES TO DISK"
control_file_record_keep_time: 7


As of this morning, I have Backup Set folders from today (6th November) going back to the 27th October.

HOWEVER, the folders for the 1st & 2nd November are empty (contain no files)


LIST BACKUP SUMMARY displays files for the 4th, 5th & 6th November

REPORT OBSOLETE: "no obsolete backups found"

LIST EXPIRED BACKUP: "specification does not match any backup in the repository"

LIST EXPIREED BACKUP OF ARCHIVELOG ALL: "specification does not match any backup in the repository"



Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: RMAN not deleting expired/obsolete backup sets
Author: Jan Schnackenberg, Germany
Date: Nov 06, 2018, 11:57, 12 days ago
Message: Hi Gary,

as mentioned previously: RMAN will not remove directories.

If LIST BACKUP SUMMARY shows 3 backups, then all is as is should be. If there are backups in the folders older than 2018-11-01, then your database has already forgotten them and could not delete them while it still knew about them.

My guess is, that there was some error during the backup that cause RMAN to believe that it did not have 3 complete backups of something.

Regards,
Jan
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: RMAN not deleting expired/obsolete backup sets
Author: Gary Campbell, Ireland
Date: Nov 06, 2018, 16:49, 12 days ago
Message: I've noticed the following error in the Alert Log which seems to occur during the RMAN backup (even though no error is triggered with the RMAN backup itself):

backup piece header validation failure for handle D:\ORACLE\FAST_RECOVERY_AREA\DB\BACKUPSET\2018_11_03\O1_MF_NNNDF_TAG20181103T030203_FXT3XRV5_.BKP

Guessing this is related, but not seeing much online or in Oracle Knowledge Base. Any ideas?


Thanks
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: RMAN not deleting expired/obsolete backup sets
Author: Jan Schnackenberg, Germany
Date: Nov 08, 2018, 09:20, 10 days ago
Message: Well, that is a rather recent backup-piece (2018-11-03) created after the start of your problems. So, while you should research the reasons for this, this is probably unrelated to the cause of the original problem.
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here