An alternate representation of the incarnations can be achieved with the following command: The advantage of querying the local catalog in the database instance is the representation of the incarnation as a path to follow. DELETE removes the physical files from the backup media, deletes the record of the backup from the recovery catalog (if RMAN is connected to a recovery catalog), and updates the records of these backups in the control file to status DELETED. Cannot Get Optimal Solution with 16 nodes of VRP with Time Windows. How to explain mathematically 2.4 GHz and 5 GHz WiFi coverage and maximum range? The best answers are voted up and rise to the top, Start here for a quick overview of the site, Detailed answers to any questions you might have, Discuss the workings and policies of this site, Learn more about Stack Overflow the company, I'm not sure I'm reading your question correctly, because of the incarnation. noon on Wednesday. to recover the Monday level 0 backup to a time between noon on Tuesday and Did Sauron suspect that the Ring would be destroyed? Is this behaviour the same in later versions of Oracle? How did this note help previous owner of this old film camera? You can however still use them to restore but in that case you need to change the incarnation yourself to the 'previous' incarnation. Would this behaviour have been different if we had a. Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Site design / logo 2022 Stack Exchange Inc; user contributions licensed under CC BY-SA. The following commands were issued to restore/recover the database into a consistent state again: Ok, we've hit an incarnation "bump" in the restore path. However, the DELETE command on Thursday removes the Immediately after each daily backup you run a DELETE OBSOLETE.

You can use RMAN to delete backups created with RMAN. With a redundancy-based retention policy, even if the specified KEEP UNTIL time has expired, the backup is retained as long as it is required to satisfy the redundancy requirement. You can then use the DELETE EXPIRED command to remove records of expired backups from the RMAN repository. After incomplete recovery and opening a 9i database with resetlogs we ran a full backup which completed successfully. Why are backups of a previous incarnation marked obsolete without regard to redundancy? By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. The above example uses a value of 1 but is clearly stating that earlier backups of full backups are not deleted until they are larger than the value configured. Thanks for contributing an answer to Database Administrators Stack Exchange! backup strategy. The

According to the documentation the retention policy setting still seems to be the same for all versions: Because Oracle RDBMS 9i is pretty much obsolete and our environment is nearly up-to-date, I was only able to re-iterate/reproduce the steps in a 12c environment. According to the PDF file Oracle Database - Backup and Recovery Reference your retention policy REDUNDANCY 2 should not have deleted your older backups: The following scenario illustrates how redundancy works in an incremental The following examples show many of the common ways to specify backups and archived logs to delete using theDELETE command: Deleting backups using primary keys from LIST output: Delete backups based on the objects backed up and the media or disk location where the backup is stored: Delete all backups for this database recorded in the RMAN repository: Delete backups and archived redo logs from disk based on whether they are backed up on tape: If you run RMAN interactively, then RMAN asks for confirmation before deleting any files. Having set REDUNDANCY 2 will always keep only the last two backups and deleting (or marking obsolete) any other previous backups, that are no longer required to bring back the database into a consistent state. Let's go ahead and delete the obsolete backups: Now that we have deleted some backup files and RMAN has performed some internal cleaning, let's have a look at the backup summary: As we can see we still have "at least" two complete backup that will allow us to restore the database two backups in the past. With a recovery window-based retention policy, even if the specified KEEP UNTIL time has expired, the backup is retained if the backup is needed to satisfy the recovery window. Oracle Database - Backup and Recovery Reference, How APIs can take the pain out of legacy system headaches (Ep. You encountered a bug during the backup and restores of your database instance. RMAN backups were performed by issuing a simple backup database; command: After a certain period of backups had been performed I double-checked the RMAN catalog: Verified that no obsolete backups were lying around: The following commands were issued to restore/recover the database into a consistent state: The restore was successful and no backups were marked as obsolete even though the incarnation changed after the restore and with the ALTER DATABASE OPEN RESETLOGS issued. KEEP UNTIL can cause backups to be kept longer than the retention policy requires, but never causes a backup to become obsolete sooner than the retention policy requires. Incremental level 1 backup with no Incremental level 0? It depends, . (see 2. and "Possible Issues"). Assume that the redundancy level is 1. Im currently poking around with these settings at work due to an issue with a third party backup product.

That's my understanding too and if I wanted to restore from a previous incarnation I'd need to RESET DATABASE but in my case I can't, because rman deleted all the backups from the prior incarnation without respect to the setting of "REDUNDANCY 2". The backup includes a command to delete obsolete backups after it finishes: However all the backups from the old incarnation were immediately marked obsolete and deleted without regard to redundancy. Show that involves a character cloning his colleagues and making them into videogame characters? For example, issue: Delete the expired backups. After the first restore we went back in time an re-restored the database again which results in the incarnation path 1 -> 2 -> 4 being the direct line of current ancestors for the open database. previous level 0 and level 1 backups. The DELETE command supports deleting several types of backups, including: DELETE BACKUP (which deletes backup sets, proxy copies, and image copies), DELETE COPY (which deletes only image copies), or DELETE ARCHIVELOG as in these examples: The DELETE command supports a wide range of options to identify backups to delete. Scripting on this page enhances content navigation, but does not change the content in any way. Deleting Expired RMAN Backups after CROSSCHECK, Deleting Obsolete RMAN Backups Based on Retention Policies, Oracle Database Backup and Recovery Reference for DELETE syntax, Oracle Database Backup and Recovery Reference for descriptions of the recovery catalog views. If the expired files still exist, then the DELETE EXPIRED command terminates with an error.

Note: "Selected/commanded," "indicated," what's the third word? To subscribe to this RSS feed, copy and paste this URL into your RSS reader. After the restore two (FULL) backups were initiated which resulted in the backups being deleted on tape. What would the. The KEEP UNTIL clause never causes RMAN to consider a backup obsolete, if the backup is still required to satisfy the retention policy. 465). To learn more, see our tips on writing great answers. It only takes a minute to sign up. Announcing the Stacks Editor Beta release! Let's restart the restore/recover again: The restore was successful and no backups were marked as obsolete even though the incarnation changed after the restore and the ALTER DATABASE OPEN RESETLOGS was issued again.

because this backup is not redundant: the Tuesday level 1 backup could be used Are shrivelled chilis safe to eat and process into chili flakes? Ill update this answer with my findings. Is moderated livestock grazing an effective countermeasure for desertification? Let's reset the incarnation to 2 and proceed with the backup: Seems to work. For complete information about these options, see Oracle Database Backup and Recovery Reference. After restoring the second time let's backup the database again: We'll now check which (backup) files have become obsolete: As can be seen the incarnation 3 is now orphaned, because its direct line of heritage in regards to the current state of the database is broken. This means you can either set one or the other. Could a license that allows later versions impose obligations or remove protections for licensors in the future? If you have LEVEL 1 and ARCHIVELOG backups in between the FULL and/or LEVEL 0 backups, then they should be retained until no longer required. For example, the RMAN repository says that a backup set is AVAILABLE when it is in fact no longer present on disk or tape (or missing from the media manager's catalog of the contents of tapes or other backup media). They can safely be deleted. Regarding the deleted backups after your initial restore in 9i I believe there are two possible scenarios: From the top of my head. You can delete files obsolete according to the configured default retention policy, or another retention policy that you specify as an option to the DELETE OBSOLETE command. Is it patent infringement to produce patented goods but take no compensation? bash loop to replace middle of string after a certain character. Thanks, we are using the controlfile rather than a catalog database, and SHOW ALL shows REDUNDANCY 2 the snippet showing CONFIGURE RETENTION POLICY in the question is an excerpt from the log file, rman logs the retention policy when you run certain commands it appears. that's why I'm asking I thought "REDUNDANCY 2" would give me 2 copies, but after RESETLOGS only the latest copy remains and all others are marked obsolete and deleted. By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. Making statements based on opinion; back them up with references or personal experience. Doc ID 206862.1 (How does the RMAN Retention Policy Obsolete Incremental Backupsets and Archivelog Files). It then updates the RMAN repository to reflect the fact that the backup is deleted, regardless of whether RMAN was able to delete the file or whether the file was already missing. As with other forms of the DELETE command, the files deleted are removed from backup media, deleted from the recovery catalog, and marked as DELETED in the control file. Are/Were you using a CONTROL FILE or a central RMAN CATALOG database? If you attempt to delete the object, then you receive a warning such as the following: If you use the DELETE command with the optional FORCE keyword, RMAN deletes the specified backups, but ignores any I/O errors, including those that occur when a backup is missing from disk or tape. rev2022.7.21.42638. Because the direct line for restoring the current database is along the incarnations of 1, 2, 4 there is no need for RMAN to keep the obsolete backups listed above. Now we are on a newer incarnation and still no Obsolete Backups reported. Why are my backups using so much space? This way they are obsolete.

Wednesday DELETE command does not remove the Tuesday level 1 backup Tuesday and Wednesday, and a level 0 backup at noon on Thursday. You can suppress these confirmations by using the NOPROMPT keyword with any form of the BACKUP command: When the CROSSCHECK command is used to determine whether backups recorded in the repository still exist on disk or tape, if RMAN cannot locate the backups, then it updates their records in the RMAN repository to EXPIRED status. Connect and share knowledge within a single location that is structured and easy to search. In general, use the DELETE command to remove backups that you do not want to retain.

database backup at noon Monday, a level 1 cumulative backup at noon on Backups are never obsolete if they are still needed to meet the retention policy, regardless of any KEEP UNTIL time. You run a level 0 Do I have to learn computer architecture for underestanding or doing reverse engineering? At the same time your latest backups become obsolete. ORA-19804. If I do another full backup now, it will retain 2 copies, honouring the REDUNDANCY 2, but apparently it does not honour this guarantee across incarnations. Why had climate change not been proven beyond doubt for so long? The incarnation is set to prevent you to restore backups that are too old. Scientifically plausible way to sink a landmass, Sets with both additive and multiplicative gaps. If you have not performed a crosscheck recently, then issue a CROSSCHECK command. The RMAN policies REDUNDANCY and RECOVERY WINDOW are mutually exclusive. Stack Exchange network consists of 180 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. For example: Oracle Database Backup and Recovery Advanced User's Guide to learn about DELETE behavior when the backup media and repository are not synchronized, Oracle Database Backup and Recovery Reference for DELETE command syntax. If you specify the DELETE OBSOLETE command with no arguments, then RMAN deletes all obsolete backups defined by the currently configured retention policy For example: You can also use the REDUNDANCY or RECOVERY WINDOW clauses with DELETE to delete backups obsolete under a specific retention policy instead of the configured default: DELETE OBSOLETE does not delete backups required to satisfy the specified retention policy, even if some backups have KEEP UNTIL times set which have passed to override the retention policy. Oracle Database Backup and Recovery Reference, Oracle Database Backup and Recovery Advanced User's Guide. RMAN (in 12c) did not delete any other backups along the incarnation path or outside of the orphaned incarnation. Asking for help, clarification, or responding to other answers. For example, issue: It is possible for the RMAN repository to indicate that an object has one status while the actual status of the object on the media is different. Deleting backups using RMAN both deletes the specified backups and updates the RMAN repository to reflect the deletion. "So having set REDUNDANCY 2 will always keep only the last two backups" except it doesn't all my backups except the latest were marked 'obsolete' after RESETLOGS and a full backup, so it kept only the last. We are currently on incarnation 3 as can be seen in the incarnation listing below which I copied from above: and the backup we are aiming for is after the RESETLOGS for incarnation 2. Is there a faction in the Ukrainian parliament favoring an immediate ceasefire? The RMAN DELETE command supports an OBSOLETE option, which deletes backups that are obsolete, that is, no longer needed to satisfy specified recoverability requirements.