{"id":2720,"date":"2021-03-16T12:14:32","date_gmt":"2021-03-16T12:14:32","guid":{"rendered":"https:\/\/swiv.com.br\/not-backed-up-and-tag-rman-options\/"},"modified":"2026-05-27T20:02:50","modified_gmt":"2026-05-27T19:02:50","slug":"not-backed-up-and-tag-rman-options","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/03\/16\/not-backed-up-and-tag-rman-options\/","title":{"rendered":"&#8220;NOT BACKED UP&#8221; and &#8220;TAG&#8221; RMAN options"},"content":{"rendered":"\n<p>A op\u00e7\u00e3o NOT BACKED UP do RMAN nos permite realizar o backup dos archivelogs que n\u00e3o tenham atingido a quantidade de backups que \u00e9 definida. No exemplo abaixo, demonstro que par\u00e2metro TIMES \u00e9 igual a 1, e podemos ver a partir da segunda execu\u00e7\u00e3o que novos archivelogs s\u00e3o considerados, e os j\u00e1 contemplados, desconsiderados (&#8220;skipping archived logs of thread 1 from sequence 41 to 42; already backed up&#8221;):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; BACKUP ARCHIVELOG ALL NOT BACKED UP 1 TIMES;\n \nStarting backup at 2021-03-16:05:43:25\ncurrent log archived\nusing channel ORA_DISK_1\nchannel ORA_DISK_1: starting archived log backup set\nchannel ORA_DISK_1: specifying archived log(s) in backup set\ninput archived log thread=1 sequence=41 RECID=48 STAMP=1067319757\ninput archived log thread=1 sequence=42 RECID=49 STAMP=1067319805\nchannel ORA_DISK_1: starting piece 1 at 2021-03-16:05:43:25\nchannel ORA_DISK_1: finished piece 1 at 2021-03-16:05:43:27\npiece handle=\/oracle\/fra\/RMANDB\/backupset\/2021_03_16\/o1_mf_annnn_TAG20210316T054325_j50vxg15_.bkp tag=TAG20210316T054325 comment=NONE\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:02\nFinished backup at 2021-03-16:05:43:27\n \nStarting Control File and SPFILE Autobackup at 2021-03-16:05:43:27\npiece handle=\/oracle\/fra\/RMANDB\/autobackup\/2021_03_16\/o1_mf_s_1067319807_j50vxhlh_.bkp comment=NONE\nFinished Control File and SPFILE Autobackup at 2021-03-16:05:43:28\n \nRMAN&gt; BACKUP ARCHIVELOG ALL NOT BACKED UP 1 TIMES;\n \nStarting backup at 2021-03-16:05:43:42\ncurrent log archived\nusing channel ORA_DISK_1\nskipping archived logs of thread 1 from sequence 41 to 42; already backed up\nchannel ORA_DISK_1: starting archived log backup set\nchannel ORA_DISK_1: specifying archived log(s) in backup set\ninput archived log thread=1 sequence=43 RECID=50 STAMP=1067319825\nchannel ORA_DISK_1: starting piece 1 at 2021-03-16:05:43:45\nchannel ORA_DISK_1: finished piece 1 at 2021-03-16:05:43:46\npiece handle=\/oracle\/fra\/RMANDB\/backupset\/2021_03_16\/o1_mf_annnn_TAG20210316T054345_j50vy1f3_.bkp tag=TAG20210316T054345 comment=NONE\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01\nFinished backup at 2021-03-16:05:43:46\n \nStarting Control File and SPFILE Autobackup at 2021-03-16:05:43:46\npiece handle=\/oracle\/fra\/RMANDB\/autobackup\/2021_03_16\/o1_mf_s_1067319826_j50vy2wq_.bkp comment=NONE\nFinished Control File and SPFILE Autobackup at 2021-03-16:05:43:47\n<\/pre><\/div>\n\n\n<p>Utilizando o SINCE TIME:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; BACKUP ARCHIVELOG ALL NOT BACKED UP SINCE TIME &#039;SYSDATE-1&#039;;\n \nStarting backup at 2021-03-16:06:02:37\ncurrent log archived\nusing target database control file instead of recovery catalog\nallocated channel: ORA_DISK_1\nchannel ORA_DISK_1: SID=35 device type=DISK\nchannel ORA_DISK_1: starting archived log backup set\nchannel ORA_DISK_1: specifying archived log(s) in backup set\ninput archived log thread=1 sequence=41 RECID=48 STAMP=1067319757\ninput archived log thread=1 sequence=42 RECID=49 STAMP=1067319805\ninput archived log thread=1 sequence=43 RECID=50 STAMP=1067319825\ninput archived log thread=1 sequence=44 RECID=51 STAMP=1067319834\ninput archived log thread=1 sequence=45 RECID=52 STAMP=1067320958\nchannel ORA_DISK_1: starting piece 1 at 2021-03-16:06:02:38\nchannel ORA_DISK_1: finished piece 1 at 2021-03-16:06:02:39\npiece handle=\/oracle\/fra\/RMANDB\/backupset\/2021_03_16\/o1_mf_annnn_TAG20210316T060238_j50x1glm_.bkp tag=TAG20210316T060238 comment=NONE\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01\nFinished backup at 2021-03-16:06:02:39\n \nStarting Control File and SPFILE Autobackup at 2021-03-16:06:02:39\npiece handle=\/oracle\/fra\/RMANDB\/autobackup\/2021_03_16\/o1_mf_s_1067320959_j50x1j85_.bkp comment=NONE\nFinished Control File and SPFILE Autobackup at 2021-03-16:06:02:40\n \nRMAN&gt; BACKUP ARCHIVELOG ALL NOT BACKED UP SINCE TIME &#039;SYSDATE-1&#039;;\n \nStarting backup at 2021-03-16:06:03:06\ncurrent log archived\nusing channel ORA_DISK_1\nskipping archived logs of thread 1 from sequence 41 to 45; already backed up\nchannel ORA_DISK_1: starting archived log backup set\nchannel ORA_DISK_1: specifying archived log(s) in backup set\ninput archived log thread=1 sequence=46 RECID=53 STAMP=1067320986\nchannel ORA_DISK_1: starting piece 1 at 2021-03-16:06:03:06\nchannel ORA_DISK_1: finished piece 1 at 2021-03-16:06:03:07\npiece handle=\/oracle\/fra\/RMANDB\/backupset\/2021_03_16\/o1_mf_annnn_TAG20210316T060306_j50x2bm9_.bkp tag=TAG20210316T060306 comment=NONE\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01\nFinished backup at 2021-03-16:06:03:07\n \nStarting Control File and SPFILE Autobackup at 2021-03-16:06:03:07\npiece handle=\/oracle\/fra\/RMANDB\/autobackup\/2021_03_16\/o1_mf_s_1067320987_j50x2d2l_.bkp comment=NONE\nFinished Control File and SPFILE Autobackup at 2021-03-16:06:03:08\n<\/pre><\/div>\n\n\n<p>O recurso de Tags nos permitem identificar de uma maneira mais acess\u00edvel os backups realizados. Pode ser utilizado nas opera\u00e7\u00f5es de LIST, RESTORE, SWITCH. Segue alguns exemplos. Realizando backup de uma tablespace:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; BACKUP TABLESPACE USERS TAG &#039;BSS&#039;;\n \nStarting backup at 2021-03-16:06:09:30\nusing channel ORA_DISK_1\nchannel ORA_DISK_1: starting full datafile backup set\nchannel ORA_DISK_1: specifying datafile(s) in backup set\ninput datafile file number=00007 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_users_h8nyrkn7_.dbf\nchannel ORA_DISK_1: starting piece 1 at 2021-03-16:06:09:31\nchannel ORA_DISK_1: finished piece 1 at 2021-03-16:06:09:32\npiece handle=\/oracle\/fra\/RMANDB\/backupset\/2021_03_16\/o1_mf_nnndf_BSS_j50xgc5b_.bkp tag=BSS comment=NONE\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01\nFinished backup at 2021-03-16:06:09:32\n \nStarting Control File and SPFILE Autobackup at 2021-03-16:06:09:32\npiece handle=\/oracle\/fra\/RMANDB\/autobackup\/2021_03_16\/o1_mf_s_1067321372_j50xgdmq_.bkp comment=NONE\nFinished Control File and SPFILE Autobackup at 2021-03-16:06:09:33\n<\/pre><\/div>\n\n\n<p>Consultando:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; LIST BACKUPSET TAG &quot;BSS&quot;;\n \n \nList of Backup Sets\n===================\n \n \nBS Key  Type LV Size       Device Type Elapsed Time Completion Time\n------- ---- -- ---------- ----------- ------------ -------------------\n100     Full    1.05M      DISK        00:00:00     2021-03-16:06:09:31\n        BP Key: 100   Status: AVAILABLE  Compressed: NO  Tag: BSS\n        Piece Name: \/oracle\/fra\/RMANDB\/backupset\/2021_03_16\/o1_mf_nnndf_BSS_j50xgc5b_.bkp\n  List of Datafiles in backup set 100\n  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name\n  ---- -- ---- ---------- ------------------- ----------- ------ ----\n  7       Full 1833119    2021-03-16:06:09:31              NO    \/oracle\/dados\/RMANDB\/datafile\/o1_mf_users_h8nyrkn7_.dbf\n<\/pre><\/div>\n\n\n<p>Deletando o backupset utilizando a TAG:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; DELETE BACKUPSET TAG &#039;BSS&#039;;\n \nusing target database control file instead of recovery catalog\nallocated channel: ORA_DISK_1\nchannel ORA_DISK_1: SID=115 device type=DISK\n \nList of Backup Pieces\nBP Key  BS Key  Pc# Cp# Status      Device Type Piece Name\n------- ------- --- --- ----------- ----------- ----------\n100     100     1   1   AVAILABLE   DISK        \/oracle\/fra\/RMANDB\/backupset\/2021_03_16\/o1_mf_nnndf_BSS_j50xgc5b_.bkp\n \nDo you really want to delete the above objects (enter YES or NO)? YES\ndeleted backup piece\nbackup piece handle=\/oracle\/fra\/RMANDB\/backupset\/2021_03_16\/o1_mf_nnndf_BSS_j50xgc5b_.bkp RECID=100 STAMP=1067321371\nDeleted 1 objects\n<\/pre><\/div>\n\n\n<p>Obs: Este procedimento foi criado pelo senhor Ahmed Baraka (www.ahmedbaraka.com) e foi apenas reproduzido por mim em um laborat\u00f3rio pessoal para fins de aprendizado.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A op\u00e7\u00e3o NOT BACKED UP do RMAN nos permite realizar o backup dos archivelogs que n\u00e3o tenham atingido a quantidade de backups que \u00e9 definida. No exemplo abaixo, demonstro que par\u00e2metro TIMES \u00e9 igual a 1, e podemos ver a partir da segunda execu\u00e7\u00e3o que novos archivelogs s\u00e3o considerados, e os j\u00e1 contemplados, desconsiderados (&#8220;skipping [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-2720","post","type-post","status-publish","format-standard","hentry","category-backup-recovery"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/2720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=2720"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/2720\/revisions"}],"predecessor-version":[{"id":9229,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/2720\/revisions\/9229"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=2720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=2720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=2720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}