{"id":3176,"date":"2021-03-26T07:55:52","date_gmt":"2021-03-26T07:55:52","guid":{"rendered":"https:\/\/swiv.com.br\/configuring-the-default-backup-format\/"},"modified":"2026-05-27T20:02:49","modified_gmt":"2026-05-27T19:02:49","slug":"configuring-the-default-backup-format","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/03\/26\/configuring-the-default-backup-format\/","title":{"rendered":"Configuring the Default Backup format"},"content":{"rendered":"\n<p>A op\u00e7\u00e3o FORMAT no RMAN nos permite definir o destino dos backups que realizamos no ambiente Oracle (que por padr\u00e3o, s\u00e3o direcionados para a FRA). Isso pode ser definido em 3 momentos:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>No comando BACKUP<\/strong>: durante a opera\u00e7\u00e3o de backup, podemos informar o FORMAT em tempo de execu\u00e7\u00e3o. Lembrando que para isto, devemos utilizar o bloco RUN do RMAN;<\/li><li><strong>Na configura\u00e7\u00e3o do Canal<\/strong>: o canal \u00e9 uma maneira do RMAN conseguir ter acesso ao banco de dados e suas estruturas, e em sua utiliza\u00e7\u00e3o, podemos definir tamb\u00e9m o FORMAT;<\/li><li><strong>Na configura\u00e7\u00e3o do Device Type<\/strong>: Al\u00e9m de definir o tipo de device que ser\u00e1 usado, podemos definir ao mesmo tempo o FORMAT;<\/li><\/ul>\n\n\n\n<p>Iniciando os testes alterando o Device Type e definindo o seu FORMAT:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel8 BACKUP]$ rman target \/\n \nRecovery Manager: Release 18.0.0.0.0 - Production on Fri Mar 26 04:41:02 2021\nVersion 18.13.0.0.0\n \nCopyright (c) 1982, 2018, Oracle and\/or its affiliates.  All rights reserved.\n \nconnected to target database: RMANDB (DBID=3825250984)\n \nRMAN&gt; CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT &#039;\/oracle\/BACKUP\/%U.bkp&#039;;\n \nusing target database control file instead of recovery catalog\nnew RMAN configuration parameters:\nCONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   &#039;\/oracle\/BACKUP\/%U.bkp&#039;;\nnew RMAN configuration parameters are successfully stored\n \nRMAN&gt; SHOW CHANNEL FOR DEVICE TYPE DISK ;\n \nRMAN configuration parameters for database with db_unique_name RMANDB are:\nCONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   &#039;\/oracle\/BACKUP\/%U.bkp&#039;;\n<\/pre><\/div>\n\n\n<p>Realizando 2 backups da tablespace USERS: como backupset e image copy:<\/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-26:04:41:42\nallocated channel: ORA_DISK_1\nchannel ORA_DISK_1: SID=57 device type=DISK\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-26:04:41:42\nchannel ORA_DISK_1: finished piece 1 at 2021-03-26:04:41:43\npiece handle=\/oracle\/BACKUP\/60vqm8k6_1_1.bkp tag=BSS comment=NONE\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01\nFinished backup at 2021-03-26:04:41:43\n \nStarting Control File and SPFILE Autobackup at 2021-03-26:04:41:43\npiece handle=\/oracle\/fra\/RMANDB\/autobackup\/2021_03_26\/o1_mf_s_1068180104_j5v41rjx_.bkp comment=NONE\nFinished Control File and SPFILE Autobackup at 2021-03-26:04:41:45\n \nRMAN&gt; BACKUP AS COPY TABLESPACE USERS TAG &#039;BSS&#039;;\n \nStarting backup at 2021-03-26:04:41:58\nusing channel ORA_DISK_1\nchannel ORA_DISK_1: starting datafile copy\ninput datafile file number=00007 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_users_h8nyrkn7_.dbf\noutput file name=\/oracle\/BACKUP\/data_D-RMANDB_I-3825250984_TS-USERS_FNO-7_62vqm8km.bkp tag=BSS RECID=37 STAMP=1068180118\nchannel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01\nFinished backup at 2021-03-26:04:41:59\n \nStarting Control File and SPFILE Autobackup at 2021-03-26:04:41:59\npiece handle=\/oracle\/fra\/RMANDB\/autobackup\/2021_03_26\/o1_mf_s_1068180119_j5v42869_.bkp comment=NONE\nFinished Control File and SPFILE Autobackup at 2021-03-26:04:42:02\n<\/pre><\/div>\n\n\n<p>Checando os arquivos gerados:<\/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; host &#039;ls -lthr \/oracle\/BACKUP&#039;;\n \ntotal 7.2M\n-rw-r-----. 1 oracle oinstall 2.2M Mar 26 04:41 60vqm8k6_1_1.bkp\n-rw-r-----. 1 oracle oinstall 5.1M Mar 26 04:41 data_D-RMANDB_I-3825250984_TS-USERS_FNO-7_62vqm8km.bkp\nhost command complete\n<\/pre><\/div>\n\n\n<p>Para redefinir o par\u00e2metro para o valor padr\u00e3o, basta rodarmos o CLEAR conforme exemplo:<\/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; CONFIGURE CHANNEL DEVICE TYPE DISK CLEAR;\n \nold RMAN configuration parameters:\nCONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   &#039;\/oracle\/BACKUP\/%U.bkp&#039;;\nold RMAN configuration parameters are successfully deleted\nreleased channel: ORA_DISK_1\n<\/pre><\/div>\n\n\n<p>Com o backup abaixo, podemos perceber que o backupset foi gerado na FRA:<\/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-26:04:48:35\nallocated channel: ORA_DISK_1\nchannel ORA_DISK_1: SID=57 device type=DISK\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-26:04:48:35\nchannel ORA_DISK_1: finished piece 1 at 2021-03-26:04:48:36\npiece handle=\/oracle\/fra\/RMANDB\/backupset\/2021_03_26\/o1_mf_nnndf_BSS_j5v4gmr1_.bkp tag=BSS comment=NONE\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01\nFinished backup at 2021-03-26:04:48:36\n \nStarting Control File and SPFILE Autobackup at 2021-03-26:04:48:36\npiece handle=\/oracle\/fra\/RMANDB\/autobackup\/2021_03_26\/o1_mf_s_1068180516_j5v4gog2_.bkp comment=NONE\nFinished Control File and SPFILE Autobackup at 2021-03-26:04:48:37\n<\/pre><\/div>\n\n\n<p>A \u00faltima forma de definir o local de destino do backup \u00e9 alocar um canal no bloco RUN, vide exemplo abaixo:<\/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; RUN\n {\n        ALLOCATE CHANNEL c1 DEVICE TYPE disk FORMAT &#039;\/oracle\/BACKUP\/RMANDB_%t_s%s_p%p&#039;;\n        BACKUP TABLESPACE users TAG &#039;BSS&#039;;\n        BACKUP ARCHIVELOG ALL DELETE INPUT TAG &#039;ARC&#039;;\n }2&gt; 3&gt; 4&gt; 5&gt; 6&gt;\n \nreleased channel: ORA_DISK_1\nallocated channel: c1\nchannel c1: SID=57 device type=DISK\n \nStarting backup at 2021-03-26:04:53:28\nchannel c1: starting full datafile backup set\nchannel c1: specifying datafile(s) in backup set\ninput datafile file number=00007 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_users_h8nyrkn7_.dbf\nchannel c1: starting piece 1 at 2021-03-26:04:53:28\nchannel c1: finished piece 1 at 2021-03-26:04:53:29\npiece handle=\/oracle\/BACKUP\/RMANDB_1068180808_s198_p1 tag=BSS comment=NONE\nchannel c1: backup set complete, elapsed time: 00:00:01\nFinished backup at 2021-03-26:04:53:29\n \nStarting backup at 2021-03-26:04:53:29\ncurrent log archived\nchannel c1: starting archived log backup set\nchannel c1: specifying archived log(s) in backup set\ninput archived log thread=1 sequence=63 RECID=70 STAMP=1068180811\nchannel c1: starting piece 1 at 2021-03-26:04:53:31\nchannel c1: finished piece 1 at 2021-03-26:04:53:32\npiece handle=\/oracle\/BACKUP\/RMANDB_1068180811_s199_p1 tag=ARC comment=NONE\nchannel c1: backup set complete, elapsed time: 00:00:01\nchannel c1: deleting archived log(s)\narchived log file name=\/oracle\/archives\/1_63_1036964654.dbf RECID=70 STAMP=1068180811\nFinished backup at 2021-03-26:04:53:33\n \nStarting Control File and SPFILE Autobackup at 2021-03-26:04:53:33\npiece handle=\/oracle\/fra\/RMANDB\/autobackup\/2021_03_26\/o1_mf_s_1068180813_j5v4qxo5_.bkp comment=NONE\nFinished Control File and SPFILE Autobackup at 2021-03-26:04:53:36\nreleased channel: c1\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 FORMAT no RMAN nos permite definir o destino dos backups que realizamos no ambiente Oracle (que por padr\u00e3o, s\u00e3o direcionados para a FRA). Isso pode ser definido em 3 momentos: No comando BACKUP: durante a opera\u00e7\u00e3o de backup, podemos informar o FORMAT em tempo de execu\u00e7\u00e3o. Lembrando que para isto, devemos utilizar o [&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-3176","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\/3176","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=3176"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/3176\/revisions"}],"predecessor-version":[{"id":9202,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/3176\/revisions\/9202"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=3176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=3176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=3176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}