Since version 10.2, rman allows to specify KEEP LOGS when executing a backup. If you dont need it, this setup is insane and increase cost and management of its environment. -> Keep until time can take date expression or specific date. We have a Data Presevation. Letsstart with some tests. In 11.1 this changed, you can create a consistent archival backup without need keep all archivelogs. When to use this rman command ( backup database keep logs forever/ until sysdate + XXX) on 11.1 version or above? 5. Why this introduction about short-term or long-term backups? If you want to skip to some topics, here is the TOC: This is not an issue at all: this will make the use of an external rman catalog even much more recommended. document.getElementById( "ak_js_1" ).setAttribute( "value", ( new Date() ).getTime() ); Enter your email address to subscribe to this blog. P.S: If you have a Long Term backup with KEEP FOREVER the Archivelogs Backups never will beobsolete. RMAN> list backup tag='TAG20130926T104236'; List of Backup Sets===================BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------387 Full 180.11M DISK 00:00:49 26-SEP-13, BP Key: 387 Status: AVAILABLE Compressed: YES Tag: TAG20130926T104236 Piece Name: /u02/fast_recovery_area/SILVER/ARCHIVAL_SILVER_d9okqfgu_1_1 Keep: BACKUP_LOGS Until: 25-MAR-14, List of Datafiles in backup set 387 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 1 Full 41435352 26-SEP-13 /u01/oradata/SILVER/system01.dbf 3 Full 41435352 26-SEP-13 /u01/oradata/SILVER/undotbs01.dbf 5 Full 41435352 26-SEP-13 /u01/oradata/SILVER/ts_data_01.dbf 6 Full 41435352 26-SEP-13 /u01/oradata/SILVER/TS_UNDO_01.DBF 7 Full 41435352 26-SEP-13 /u01/oradata/SILVER/ts_nologging_01.dbf 8 Full 41435352 26-SEP-13 /u01/oradata/SILVER/ts_archive_01.dbfBS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------388 Full 544.72M DISK 00:01:28 26-SEP-13 BP Key: 388 Status: AVAILABLE Compressed: YES Tag: TAG20130926T104236 Piece Name: /u02/fast_recovery_area/SILVER/ARCHIVAL_SILVER_d8okqfgu_1_1 Keep: BACKUP_LOGS Until: 25-MAR-14, List of Datafiles in backup set 388 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 2 Full 41435351 26-SEP-13 /u01/oradata/SILVER/sysaux01.dbf 4 Full 41435351 26-SEP-13 /u01/oradata/SILVER/users01.dbf 9 Full 41435351 26-SEP-13 /u01/oradata/SILVER/PM101.DBF 10 Full 41435351 26-SEP-13 /u01/oradata/SILVER/PM201.DBF 11 Full 41435351 26-SEP-13 /u01/oradata/SILVER/PM301.DBFBS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------389 Full 80.00K DISK 00:00:01 26-SEP-13 BP Key: 389 Status: AVAILABLE Compressed: YES Tag: TAG20130926T104236 Piece Name: /u02/fast_recovery_area/SILVER/ARCHIVAL_SILVER_daokqfjr_1_1 Keep: BACKUP_LOGS Until: 25-MAR-14, SPFILE Included: Modification time: 26-SEP-13 SPFILE db_unique_name: SILVER, BS Key Size Device Type Elapsed Time Completion Time------- ---------- ----------- ------------ ---------------390 84.50K DISK 00:00:00 26-SEP-13 BP Key: 390 Status: AVAILABLE Compressed: YES Tag: TAG20130926T104236 Piece Name: /u02/fast_recovery_area/SILVER/ARCHIVAL_SILVER_dbokqfjv_1_1 Keep: BACKUP_LOGS Until: 25-MAR-14, List of Archived Logs in backup set 390 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 213 41435308 26-SEP-13 41435405 26-SEP-13BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------391 Full 1.17M DISK 00:00:04 26-SEP-13, BP Key: 391 Status: AVAILABLE Compressed: YES Tag: TAG20130926T104236 Piece Name: /u02/fast_recovery_area/SILVER/ARCHIVAL_SILVER_dcokqfk0_1_1 Keep: BACKUP_LOGS Until: 25-MAR-14, Control File Included: Ckp SCN: 41435410 Ckp time: 26-SEP-13. Changeto unavailableBackup 1,2,3,4 and archivelogs to restore these database. Data preservation is related to data protection, but it serves a different purpose. All archivelogs that does not have status UNAVAILABLE until 01/02/2016 12:00 will be obsolete and will deleted on next delete obsolete. comment=API Version 2.0,MMS Version 5.5.2.0, backup will be obsolete on date Mar 24 2017 15:58:47, including current control file in backup set, channel tape1: starting piece 1 at Feb 18 2016 15:58:49, channel tape1: finished piece 1 at Feb 18 2016 15:58:50, piece handle=RMAN_MONTHLY_FULL_TESTDB_331_1_20160218_1 tag=MONTHLY_FULL_20160218
In our world they need to be periodically monitored and tested to check their validity and to measure RTO. -> When you specify keep until clause RMAN marks the backup obsolete when specified Until time has passed. Splitting the backup in several backuppiece may lead us to same result if the VTL will store them on different tapes. FireFox on the march 29%! This backup is not part of the disaster recovery strategy. When backup starts, it switched redo log and archives it. SQL> select scn,guarantee_flashback_database,name from v$restore_point; SCN GUA NAME---------------- --- ------------------------------41435395 NO BEFORE_UPGRADE, RMAN Archival backups with restore points, backup as compressed backupset check logical database format '/u02/fast_recovery_area/SILVER/ARCHIVAL_%d_%U', SPFILE Included: Modification time: 26-SEP-13, Script to get info from the Auto Maintenance Gather Stats job, Using dbms_comparison to troubleshoot logical standby databases, Grant a "standard" DB user the possibility to unlock a user, Redo log management in physical standby database, Succeeding with online table redefinition, How to restore an RMAN cold backup on a new server. For cold backupsThe NOLOGS attribute was perfect, but the NOLOGS couldn' t be used for hot backups since you need at least 1 archivelog backed up to recover this backup to a consistent state). Change), You are commenting using your Twitter account. Please note that rman will not only retain the archivelog needed to recover the backup: it will retaing all subsequent archivelog (or their backup). Short-Term Backups are classic backup which have short retention and are stored on pool of data active, often these data are always availableon Tape Library or Disk. It can happen though that the business or DBA would like to keep a backup for a longer time. RMAN resynchronizes restore points with the recovery catalog and maintains the restore points as long as the backup exists. In my last post I talked about using an out-of-the-box policy to sign your outgoing SOAP Message. Thats mean, if it go wrong you will have a backup of database without archivelog to recovery it. (LogOut/ Specifying %U is the easiest way to meet this requirement. comment=API Version 2.0,MMS Version 5.5.2.0. -> Self-contained backup because it contains all the files necessary to restore and recover backup to a consistent state. First of all you need re-configure your scripts to long-term backups by using restore point from now. With the target database closed it proved to be impossible to set a restorepoint within my rman restore script ( and you really need this restorepoint to restore the spfile! I added a show all; command in any rman configuration script. rman validate and rman crosscheck ). Consider running it only once a week with increased parallelism only on a subset of the database, i.e. If available, RMAN uses these backups for disaster recovery restore operations, but their purpose is to produce a snapshot of the database that can be restored on another system for testing or historical usage. No other KEEP options require a catalog. -> Since multiple backup sets are created, proper format clause need to be used so as to allow for creating multiple backup pieces. All the backupset related to tag archival now comes under retention policy. https://docs.oracle.com/cd/B28359_01/backup.111/b28270/rcmbckba.htm#CHDHAFHJ ). While here the backupped spfile is used as the spfile of the new database, I ran into some difficulty doing the same when restoring to a running database that already started with a spfile, or even with a closed database. This is the main topic, the reason which made me write down this note. However, a massive parallel archival backup may slow down concurrent operations. I feel safer with no automatic optimization in place, as backup optimization could exclude some datafiles from backups. In order to automate some checks, we may run the following: Please note that restore validate will not write anything: it will only READ the backup and it will leave the database running untouched. You can ask: I dont want to keep all logs and want to keep only my backups which is not obsolete? To overcome this limit I added to any archival backup an additional archivelog backup. A really useful 11G new feature are the archival backups optionally with restore points. RMAN uses the FORMAT, POOL, and TAG parameters for all the backups. DEVICE TYPE 'SBT_TAPE' PARMS
-> We can only use this backup to recover to the point where the backup was taken. The SCN is captured just after the datafile backups complete.
Example 3-23 Creating a Consistent Database Backup for Archival. backup and log should contain as much information as possible to restore the database and its configuration. Please note that both ordinary rman backups and archival rman backups must backup the same archivelog independently: we must ensure that the archivelog backup will not delete any archivelog needed by the archival backup. Change). This is obviusly redundat, but I choosed to tolerate this overhead to keep my backup scripts as simple as possible. -> backs up datafiles, archived redo logs, the control file, and the server parameter file . Hyper-V vs Vagrant/VirtualBox, Docker, WebLogic Image on Oracle Container Cloud Service, Using bindings to connect Azure Functions to Azure Queue Storage, How to deploy InfluxDB in Azure using a VM service with dedicated storage, Using Azure Artifacts for your own NPM modules. AMIS, Data Driven Blog Oracle & Microsoft Azure, Getting value from IoT, Integration and Data Analytics. (in fact have diference, but its a slight difference).
Change only Backup 1 and Archivelogs to Restore this Backup to unavailable. 5) use the FRA to store archivelog in order to reduce RTO. This example makes a database backup with tag Q107 and specifies that it should never be considered obsolete (partial sample output included). To avoid these issue we will not use rmans configured degree of parallelism and we will explicitly allocate a low number of channel in archival backup scripts. With version 11.1 rman introduced archival backups ( see https://docs.oracle.com/cd/B28359_01/backup.111/b28270/wnbradv.htm#BRADV021 and The manuals say that You can use BACKUP KEEP UNTIL to create a backup that is both all-inclusive and exempt from the backup retention policy. deleting, changing their retention, restoring/duplicating from tag, . Ex: keep until time 25-apr-13 : To use specific date you need to set NLS_DATE_FORMAT and NLS_LANG environment variables appropriately. (LogOut/ My procedure looks like this: The last step will make an additional backup of archivelog backed up at step 4. (i.e you dont will be able to recovery that backup). When KEEP is specified, RMAN creates multiple backup sets. tag=MONTHLY_FULL_20160218, channel ORA_SBT_TAPE_1: restored backup piece 1, channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:02, output file name=+TSM/testdb/controlfile/current.518.901826451, Starting implicit crosscheck backup at 18-02-2016 16:56:48, channel ORA_DISK_1: SID=225 device type=DISK, Finished implicit crosscheck backup at 18-02-2016 16:56:49, Starting implicit crosscheck copy at 18-02-2016 16:56:49, Finished implicit crosscheck copy at 18-02-2016 16:56:49, searching for all files in the recovery area, channel ORA_SBT_TAPE_1: SID=233 device type=SBT_TAPE, channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set, channel ORA_SBT_TAPE_1: restoring datafile 00001 to +TSM/testdb/datafile/system.501.901826545, channel ORA_SBT_TAPE_1: restoring datafile 00002 to +TSM/testdb/datafile/sysaux.542.901826547, channel ORA_SBT_TAPE_1: restoring datafile 00003 to +TSM/testdb/datafile/undotbs1.442.901826547, channel ORA_SBT_TAPE_1: restoring datafile 00004 to +TSM/testdb/datafile/users.314.901826547, channel ORA_SBT_TAPE_1: restoring datafile 00005 to +TSM/testdb/datafile/users.510.901826547, channel ORA_SBT_TAPE_1: restoring datafile 00006 to +TSM/testdb/datafile/users.487.901826545, channel ORA_SBT_TAPE_1: reading from backup piece RMAN_MONTHLY_FULL_TESTDB_328_1_20160218_1, channel ORA_SBT_TAPE_1: piece handle=RMAN_MONTHLY_FULL_TESTDB_328_1_20160218_1