{"id":5783,"date":"2021-07-13T23:39:33","date_gmt":"2021-07-13T23:39:33","guid":{"rendered":"https:\/\/swiv.com.br\/using-dbcli-for-taking-database-backups\/"},"modified":"2026-05-27T20:02:30","modified_gmt":"2026-05-27T19:02:30","slug":"using-dbcli-for-taking-database-backups","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/07\/13\/using-dbcli-for-taking-database-backups\/","title":{"rendered":"Using dbcli for Taking Database Backups"},"content":{"rendered":"\n<p>Podemos realizar backup de nossos DB Systems atrav\u00e9s da OCI Console, API, RMAN ou pelo utilit\u00e1rio DBCLI. Neste artigo, vamos simular a utiliza\u00e7\u00e3o do DBCLI. Este m\u00e9todo nos permite realizar os backups em disco (DISK) ou diretamente no OCI Object Storage (OBJECTSTORE), al\u00e9m de conseguirmos definir o tempo de reten\u00e7\u00e3o dos mesmos (Recovery Window), por n\u00famero de dias. Vale lembrar que n\u00e3o \u00e9 poss\u00edvel realizar o RESTORE do ambiente pelo DBCLI. Neste caso, seria necess\u00e1rio o bom e velho RMAN.<\/p>\n\n\n\n<p>Logado com o usu\u00e1rio root, criamos um &#8220;Backup Configuration&#8221; populado com os par\u00e2metros do 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=\"\">\n&#x5B;opc@luxor ~]$ sudo su -\nLast login: Tue Jul 13 22:49:02 UTC 2021\n&#x5B;root@luxor ~]# dbcli create-backupconfig --name CORTEXBKP --backupdestination disk --recoverywindow 5\n{\n  &quot;jobId&quot; : &quot;8ace01bf-2b8c-40d6-9581-ada419506ccf&quot;,\n  &quot;status&quot; : &quot;Created&quot;,\n  &quot;message&quot; : &quot;backup config creation&quot;,\n  &quot;reports&quot; : &#x5B; ],\n  &quot;createTimestamp&quot; : &quot;July 13, 2021 22:53:41 PM UTC&quot;,\n  &quot;resourceList&quot; : &#x5B; {\n    &quot;resourceId&quot; : &quot;ef04e57f-3a8a-42c1-be03-21e816025085&quot;,\n    &quot;resourceType&quot; : &quot;BackupConfig&quot;,\n    &quot;jobId&quot; : &quot;8ace01bf-2b8c-40d6-9581-ada419506ccf&quot;,\n    &quot;updatedTime&quot; : &quot;July 13, 2021 22:53:42 PM UTC&quot;\n  } ],\n  &quot;description&quot; : &quot;create backup config:CORTEXBKP&quot;,\n  &quot;updatedTime&quot; : &quot;July 13, 2021 22:53:42 PM UTC&quot;,\n  &quot;percentageProgress&quot; : &quot;0%&quot;\n}\n<\/pre><\/div>\n\n\n<p>Acompanhando o Job de cria\u00e7\u00e3o do BC:<\/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;root@luxor ~]# dbcli describe-job -i &quot;8ace01bf-2b8c-40d6-9581-ada419506ccf&quot;\n \nJob details\n----------------------------------------------------------------\n                     ID:  8ace01bf-2b8c-40d6-9581-ada419506ccf\n            Description:  create backup config:CORTEXBKP\n                 Status:  Success\n                Created:  July 13, 2021 10:53:41 PM UTC\n               Progress:  100%\n                Message:  backup config creation\n \nTask Name                                                                Start Time                          End Time                            Status\n------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------\nCreate Backup Configuration                                              July 13, 2021 10:53:42 PM UTC       July 13, 2021 10:53:43 PM UTC       Success\n<\/pre><\/div>\n\n\n<p>Podemos ver a exist\u00eancia do BC com o comando abaixo:<\/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;root@luxor ~]# dbcli list-backupconfigs\n \nID                                       Name                 RecoveryWindow   CrosscheckEnabled   BackupDestination\n---------------------------------------- -------------------- ---------------- ------------------- --------------------\nef04e57f-3a8a-42c1-be03-21e816025085     CORTEXBKP            5                true                Disk\n<\/pre><\/div>\n\n\n<p>E os detalhes do BC com o exemplo abaixo (inclusive o seu ID, que usaremos em breve):<\/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;root@luxor ~]# dbcli describe-backupconfig -in CORTEXBKP\nBackup Config details\n----------------------------------------------------------------\n                     ID: ef04e57f-3a8a-42c1-be03-21e816025085\n                   Name: CORTEXBKP\n      CrosscheckEnabled: true\n         RecoveryWindow: 5\n      BackupDestination: Disk\n         BackupLocation:\n          ObjectStoreId:\n            CreatedTime: July 13, 2021 10:53:41 PM UTC\n            UpdatedTime: July 13, 2021 10:53:43 PM UTC\n       LocationAffinity:\n            RecoveryTag:\n&#x5B;root@luxor ~]#\n<\/pre><\/div>\n\n\n<p>Agora podemos coletar o ID do nosso database:<\/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;root@luxor ~]# dbcli list-databases\n \nID                                       DB Name    DB Type  DB Version           CDB        Class    Shape    Storage    Status        DbHomeID     \n---------------------------------------- ---------- -------- -------------------- ---------- -------- -------- ---------- ------------ ----------------------------------------\n4c906765-68ea-4e05-ba3f-c54152f912cf     CORTEX     Si       19.11.0.0.0          true       Oltp              ASM        Configured   d08b9441-b181-42b1-b6be-11616fa9580c\n<\/pre><\/div>\n\n\n<p>O que \u00e9 importante notarmos: os par\u00e2metros do RMAN antes e depois de associarmos o BC com o database. Reparemos o valor dos par\u00e2metros abaixo antes da altera\u00e7\u00e3o:<\/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;opc@luxor ~]$ sudo su - oracle\nLast login: Tue Jul 13 23:07:20 UTC 2021\n&#x5B;oracle@luxor ~]$ rman target \/\n \nRecovery Manager: Release 19.0.0.0.0 - Production on Tue Jul 13 23:07:55 2021\nVersion 19.11.0.0.0\n \nCopyright (c) 1982, 2019, Oracle and\/or its affiliates.  All rights reserved.\n \nconnected to target database: CORTEX (DBID=581933924)\n \nRMAN&gt; SHOW RETENTION POLICY;\n \nusing target database control file instead of recovery catalog\nRMAN configuration parameters for database with db_unique_name CORTEX_PHX1HB are:\nCONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default\n \nRMAN&gt; SHOW DEFAULT DEVICE TYPE\n2&gt; ;\n \nRMAN configuration parameters for database with db_unique_name CORTEX_PHX1HB are:\nCONFIGURE DEFAULT DEVICE TYPE TO DISK; # default\n<\/pre><\/div>\n\n\n<p>Vamos associar o database com o BC:<\/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;root@luxor ~]# dbcli update-database --backupconfigid ef04e57f-3a8a-42c1-be03-21e816025085 --dbid 4c906765-68ea-4e05-ba3f-c54152f912cf\n{\n  &quot;jobId&quot; : &quot;35b9609a-b7fa-45b9-b6fa-f61b1e936ff8&quot;,\n  &quot;status&quot; : &quot;Created&quot;,\n  &quot;message&quot; : &quot;update database&quot;,\n  &quot;reports&quot; : &#x5B; ],\n  &quot;createTimestamp&quot; : &quot;July 13, 2021 23:10:29 PM UTC&quot;,\n  &quot;resourceList&quot; : &#x5B; {\n    &quot;resourceId&quot; : &quot;4c906765-68ea-4e05-ba3f-c54152f912cf&quot;,\n    &quot;resourceType&quot; : &quot;DB&quot;,\n    &quot;jobId&quot; : &quot;35b9609a-b7fa-45b9-b6fa-f61b1e936ff8&quot;,\n    &quot;updatedTime&quot; : &quot;July 13, 2021 23:10:30 PM UTC&quot;\n  } ],\n  &quot;description&quot; : &quot;update database : CORTEX&quot;,\n  &quot;updatedTime&quot; : &quot;July 13, 2021 23:10:36 PM UTC&quot;,\n  &quot;percentageProgress&quot; : &quot;0%&quot;\n}\n<\/pre><\/div>\n\n\n<p>Acompanhando o Job:<\/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;root@luxor ~]# dbcli describe-job -i &quot;35b9609a-b7fa-45b9-b6fa-f61b1e936ff8&quot;\n \nJob details\n----------------------------------------------------------------\n                     ID:  35b9609a-b7fa-45b9-b6fa-f61b1e936ff8\n            Description:  update database : CORTEX\n                 Status:  Running\n                Created:  July 13, 2021 11:10:29 PM UTC\n               Progress:  71%\n                Message:  update database\n \nTask Name                                                                Start Time                          End Time                            Status\n------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------\nConfigure Database for Backup                                            July 13, 2021 11:10:37 PM UTC       July 13, 2021 11:10:37 PM UTC       Running\n \n&#x5B;root@luxor ~]# dbcli describe-job -i &quot;35b9609a-b7fa-45b9-b6fa-f61b1e936ff8&quot;\n \nJob details\n----------------------------------------------------------------\n                     ID:  35b9609a-b7fa-45b9-b6fa-f61b1e936ff8\n            Description:  update database : CORTEX\n                 Status:  Success\n                Created:  July 13, 2021 11:10:29 PM UTC\n               Progress:  100%\n                Message:  update database\n \nTask Name                                                                Start Time                          End Time                            Status\n------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------\nConfigure Database for Backup                                            July 13, 2021 11:10:37 PM UTC       July 13, 2021 11:13:17 PM UTC       Success\n<\/pre><\/div>\n\n\n<p>Agora vemos que a associa\u00e7\u00e3o do BC ao database teve reflexo nos par\u00e2metros do RMAN (especificamente ao de reten\u00e7\u00e3o, j\u00e1 que o de device type continuar\u00e1 como DISK):<\/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@luxor ~]$ rman target \/\n \nRecovery Manager: Release 19.0.0.0.0 - Production on Tue Jul 13 23:15:22 2021\nVersion 19.11.0.0.0\n \nCopyright (c) 1982, 2019, Oracle and\/or its affiliates.  All rights reserved.\n \nconnected to target database: CORTEX (DBID=581933924)\n \nRMAN&gt; SHOW RETENTION POLICY;\n \nusing target database control file instead of recovery catalog\nRMAN configuration parameters for database with db_unique_name CORTEX_PHX1HB are:\nCONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 5 DAYS;\n \nRMAN&gt; SHOW DEFAULT DEVICE TYPE;\n \nRMAN configuration parameters for database with db_unique_name CORTEX_PHX1HB are:\nCONFIGURE DEFAULT DEVICE TYPE TO DISK; # default\n<\/pre><\/div>\n\n\n<p>Constatando que meu DB ainda n\u00e3o possui backup:<\/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 BACKUP OF DATABASE;\n\nspecification does not match any backup in the repository\n<\/pre><\/div>\n\n\n<p>Realizando o backup do nosso banco CORTEX com o DBCLI:<\/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;root@luxor ~]# dbcli create-backup --dbName CORTEX --backupType Regular-L0 --tag CORTEX_L0\n{\n  &quot;jobId&quot; : &quot;1dba6630-8bd9-4210-9244-77c084ad55b6&quot;,\n  &quot;status&quot; : &quot;Created&quot;,\n  &quot;message&quot; : null,\n  &quot;reports&quot; : &#x5B; ],\n  &quot;createTimestamp&quot; : &quot;July 13, 2021 23:18:55 PM UTC&quot;,\n  &quot;resourceList&quot; : &#x5B; ],\n  &quot;description&quot; : &quot;Create Regular-L0 Backup with TAG-CORTEX_L0 for Db:CORTEX in FRA&quot;,\n  &quot;updatedTime&quot; : &quot;July 13, 2021 23:18:58 PM UTC&quot;,\n  &quot;percentageProgress&quot; : &quot;0%&quot;\n}\n<\/pre><\/div>\n\n\n<p>Acompanhando Job:<\/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;root@luxor ~]# dbcli describe-job -i &quot;1dba6630-8bd9-4210-9244-77c084ad55b6&quot;\n \nJob details\n----------------------------------------------------------------\n                     ID:  1dba6630-8bd9-4210-9244-77c084ad55b6\n            Description:  Create Regular-L0 Backup with TAG-CORTEX_L0 for Db:CORTEX in FRA\n                 Status:  Running\n                Created:  July 13, 2021 11:18:55 PM UTC\n               Progress:  1%\n                Message:\n \nTask Name                                                                Start Time                          End Time                            Status\n------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------\nValidate Database backup Configuration                                   July 13, 2021 11:18:58 PM UTC       July 13, 2021 11:18:58 PM UTC       Running\n \n&#x5B;root@luxor ~]# dbcli describe-job -i &quot;1dba6630-8bd9-4210-9244-77c084ad55b6&quot;\n \nJob details\n----------------------------------------------------------------\n                     ID:  1dba6630-8bd9-4210-9244-77c084ad55b6\n            Description:  Create Regular-L0 Backup with TAG-CORTEX_L0 for Db:CORTEX in FRA\n                 Status:  Running\n                Created:  July 13, 2021 11:18:55 PM UTC\n               Progress:  25%\n                Message:\n \nTask Name                                                                Start Time                          End Time                            Status\n------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------\nValidate Database backup Configuration                                   July 13, 2021 11:18:58 PM UTC       July 13, 2021 11:19:59 PM UTC       Success\nBackup Database                                                          July 13, 2021 11:19:59 PM UTC       July 13, 2021 11:19:59 PM UTC       Running\n \n&#x5B;root@luxor ~]# dbcli describe-job -i &quot;1dba6630-8bd9-4210-9244-77c084ad55b6&quot;\n \nJob details\n----------------------------------------------------------------\n                     ID:  1dba6630-8bd9-4210-9244-77c084ad55b6\n            Description:  Create Regular-L0 Backup with TAG-CORTEX_L0 for Db:CORTEX in FRA\n                 Status:  Success\n                Created:  July 13, 2021 11:18:55 PM UTC\n               Progress:  100%\n                Message:\n \nTask Name                                                                Start Time                          End Time                            Status\n------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------\nValidate Database backup Configuration                                   July 13, 2021 11:18:58 PM UTC       July 13, 2021 11:19:59 PM UTC       Success\nBackup Database                                                          July 13, 2021 11:19:59 PM UTC       July 13, 2021 11:24:33 PM UTC       Success\nValidate the backup                                                      July 13, 2021 11:24:33 PM UTC       July 13, 2021 11:24:47 PM UTC       Success\nBackup TDE Wallet.                                                       July 13, 2021 11:24:47 PM UTC       July 13, 2021 11:24:47 PM UTC       Success\n<\/pre><\/div>\n\n\n<p>O RMAN j\u00e1 faz o reconhecimento dos backup pieces gerados pelo processo:<\/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 BACKUP OF DATABASE TAG CORTEX_L0;\n \n \nList of Backup Sets\n===================\n \n \nBS Key  Type LV Size       Device Type Elapsed Time Completion Time\n------- ---- -- ---------- ----------- ------------ ---------------\n10      Incr 0  514.76M    DISK        00:00:25     13-JUL-21\n        BP Key: 10   Status: AVAILABLE  Compressed: YES  Tag: CORTEX_L0\n        Piece Name: +RECO\/CORTEX_PHX1HB\/BACKUPSET\/2021_07_13\/nnndn0_cortex_l0_0.298.1077837775\n  List of Datafiles in backup set 10\n  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name\n  ---- -- ---- ---------- --------- ----------- ------ ----\n  1    0  Incr 6122522    13-JUL-21              NO    +DATA\/CORTEX_PHX1HB\/DATAFILE\/system.261.1071999329\n  3    0  Incr 6122522    13-JUL-21              NO    +DATA\/CORTEX_PHX1HB\/DATAFILE\/sysaux.262.1071999373\n  4    0  Incr 6122522    13-JUL-21              NO    +DATA\/CORTEX_PHX1HB\/DATAFILE\/undotbs1.263.1071999399\n  11   0  Incr 6122522    13-JUL-21              NO    +DATA\/CORTEX_PHX1HB\/DATAFILE\/users.274.1072000383\n \nBS Key  Type LV Size       Device Type Elapsed Time Completion Time\n------- ---- -- ---------- ----------- ------------ ---------------\n11      Incr 0  253.48M    DISK        00:00:18     13-JUL-21\n        BP Key: 11   Status: AVAILABLE  Compressed: YES  Tag: CORTEX_L0\n        Piece Name: +RECO\/CORTEX_PHX1HB\/C1CF6DCEA12F134DE0539501000A20C1\/BACKUPSET\/2021_07_13\/nnndn0_cortex_l0_0.299.1077837801\n  List of Datafiles in backup set 11\n  Container ID: 3, PDB Name: HIPOFISE1\n  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name\n  ---- -- ---- ---------- --------- ----------- ------ ----\n  8    0  Incr 6122540    13-JUL-21              NO    +DATA\/CORTEX_PHX1HB\/C1CF6DCEA12F134DE0539501000A20C1\/DATAFILE\/system.271.1072000035\n  9    0  Incr 6122540    13-JUL-21              NO    +DATA\/CORTEX_PHX1HB\/C1CF6DCEA12F134DE0539501000A20C1\/DATAFILE\/sysaux.272.1072000035\n  10   0  Incr 6122540    13-JUL-21              NO    +DATA\/CORTEX_PHX1HB\/C1CF6DCEA12F134DE0539501000A20C1\/DATAFILE\/undotbs1.270.1072000035\n  12   0  Incr 6122540    13-JUL-21              NO    +DATA\/CORTEX_PHX1HB\/C1CF6DCEA12F134DE0539501000A20C1\/DATAFILE\/users.275.1072000383\n \nBS Key  Type LV Size       Device Type Elapsed Time Completion Time\n------- ---- -- ---------- ----------- ------------ ---------------\n12      Incr 0  316.40M    DISK        00:00:10     13-JUL-21\n        BP Key: 12   Status: AVAILABLE  Compressed: YES  Tag: CORTEX_L0\n        Piece Name: +RECO\/CORTEX_PHX1HB\/C1CF50B886E7568DE0539501000A38F1\/BACKUPSET\/2021_07_13\/nnndn0_cortex_l0_0.300.1077837825\n  List of Datafiles in backup set 12\n  Container ID: 2, PDB Name: PDB$SEED\n  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name\n  ---- -- ---- ---------- --------- ----------- ------ ----\n  5    0  Incr 5899769    05-JUN-21              NO    +DATA\/CORTEX_PHX1HB\/B2084748142A4638E053C003F40A65C0\/DATAFILE\/system.266.1071999505\n  6    0  Incr 5899769    05-JUN-21              NO    +DATA\/CORTEX_PHX1HB\/B2084748142A4638E053C003F40A65C0\/DATAFILE\/sysaux.265.1071999505\n  7    0  Incr 5899769    05-JUN-21              NO    +DATA\/CORTEX_PHX1HB\/B2084748142A4638E053C003F40A65C0\/DATAFILE\/undotbs1.267.1071999505\n<\/pre><\/div>\n\n\n<p>Caso precisemos alterar algum valor de par\u00e2metro do nosso BC, podemos realizar conforme 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=\"\">\n&#x5B;root@luxor ~]# dbcli update-backupconfig -in CORTEXBKP --recoverywindow 6\n{\n  &quot;jobId&quot; : &quot;7f6d7aee-e05f-4620-bc2b-7a0109f1f9a8&quot;,\n  &quot;status&quot; : &quot;Created&quot;,\n  &quot;message&quot; : &quot;backup config&quot;,\n  &quot;reports&quot; : &#x5B; ],\n  &quot;createTimestamp&quot; : &quot;July 13, 2021 23:29:58 PM UTC&quot;,\n  &quot;resourceList&quot; : &#x5B; {\n    &quot;resourceId&quot; : &quot;ef04e57f-3a8a-42c1-be03-21e816025085&quot;,\n    &quot;resourceType&quot; : &quot;BackupConfig&quot;,\n    &quot;jobId&quot; : &quot;7f6d7aee-e05f-4620-bc2b-7a0109f1f9a8&quot;,\n    &quot;updatedTime&quot; : &quot;July 13, 2021 23:29:59 PM UTC&quot;\n  } ],\n  &quot;description&quot; : &quot;update backup config: CORTEXBKP&quot;,\n  &quot;updatedTime&quot; : &quot;July 13, 2021 23:30:02 PM UTC&quot;,\n  &quot;percentageProgress&quot; : &quot;0%&quot;\n}\n&#x5B;root@luxor ~]# dbcli describe-job -i &quot;7f6d7aee-e05f-4620-bc2b-7a0109f1f9a8&quot;\n \nJob details\n----------------------------------------------------------------\n                     ID:  7f6d7aee-e05f-4620-bc2b-7a0109f1f9a8\n            Description:  update backup config: CORTEXBKP\n                 Status:  Success\n                Created:  July 13, 2021 11:29:58 PM UTC\n               Progress:  100%\n                Message:  backup config\n \nTask Name                                                                Start Time                          End Time                            Status\n------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------\nUpdate Backup Configuration                                              July 13, 2021 11:30:02 PM UTC       July 13, 2021 11:31:33 PM UTC       Success\n<\/pre><\/div>\n\n\n<p>Examinando o reflexo da mudan\u00e7a no par\u00e2metro do RMAN:<\/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; SHOW RETENTION POLICY;\n \nRMAN configuration parameters for database with db_unique_name CORTEX_PHX1HB are:\nCONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 6 DAYS;\n<\/pre><\/div>\n\n\n<p>Como mencionado no come\u00e7o do artigo, o evento de restore n\u00e3o pode ser feito pelo DBCLI, mas o RMAN tem totais condi\u00e7\u00f5es de faz\u00ea-lo utilizando o backup realizado pelo DBCLI. Vamos realizar o teste:<\/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@luxor ~]$ rman target \/\n \nRecovery Manager: Release 19.0.0.0.0 - Production on Tue Jul 13 23:34:34 2021\nVersion 19.11.0.0.0\n \nCopyright (c) 1982, 2019, Oracle and\/or its affiliates.  All rights reserved.\n \nconnected to target database: CORTEX (DBID=581933924)\n \nRMAN&gt; SHUTDOWN IMMEDIATE;\n \nusing target database control file instead of recovery catalog\ndatabase closed\ndatabase dismounted\nOracle instance shut down\n \nRMAN&gt; STARTUP MOUNT;\n \nconnected to target database (not started)\nOracle instance started\ndatabase mounted\n \nTotal System Global Area    6442449664 bytes\n \nFixed Size                     9149184 bytes\nVariable Size               1577058304 bytes\nDatabase Buffers            4831838208 bytes\nRedo Buffers                  24403968 bytes\n \nRMAN&gt; RESTORE DATABASE FROM TAG CORTEX_L0;\n \nStarting restore at 13-JUL-21\nallocated channel: ORA_DISK_1\nchannel ORA_DISK_1: SID=28 device type=DISK\n \nskipping datafile 5; already restored to file +DATA\/CORTEX_PHX1HB\/B2084748142A4638E053C003F40A65C0\/DATAFILE\/system.266.1071999505\nskipping datafile 6; already restored to file +DATA\/CORTEX_PHX1HB\/B2084748142A4638E053C003F40A65C0\/DATAFILE\/sysaux.265.1071999505\nskipping datafile 7; already restored to file +DATA\/CORTEX_PHX1HB\/B2084748142A4638E053C003F40A65C0\/DATAFILE\/undotbs1.267.1071999505\nchannel ORA_DISK_1: starting datafile backup set restore\nchannel ORA_DISK_1: specifying datafile(s) to restore from backup set\nchannel ORA_DISK_1: restoring datafile 00001 to +DATA\/CORTEX_PHX1HB\/DATAFILE\/system.261.1071999329\nchannel ORA_DISK_1: restoring datafile 00003 to +DATA\/CORTEX_PHX1HB\/DATAFILE\/sysaux.262.1071999373\nchannel ORA_DISK_1: restoring datafile 00004 to +DATA\/CORTEX_PHX1HB\/DATAFILE\/undotbs1.263.1071999399\nchannel ORA_DISK_1: restoring datafile 00011 to +DATA\/CORTEX_PHX1HB\/DATAFILE\/users.274.1072000383\nchannel ORA_DISK_1: reading from backup piece +RECO\/CORTEX_PHX1HB\/BACKUPSET\/2021_07_13\/nnndn0_cortex_l0_0.298.1077837775\nchannel ORA_DISK_1: piece handle=+RECO\/CORTEX_PHX1HB\/BACKUPSET\/2021_07_13\/nnndn0_cortex_l0_0.298.1077837775 tag=CORTEX_L0\nchannel ORA_DISK_1: restored backup piece 1\nchannel ORA_DISK_1: restore complete, elapsed time: 00:00:35\nchannel ORA_DISK_1: starting datafile backup set restore\nchannel ORA_DISK_1: specifying datafile(s) to restore from backup set\nchannel ORA_DISK_1: restoring datafile 00008 to +DATA\/CORTEX_PHX1HB\/C1CF6DCEA12F134DE0539501000A20C1\/DATAFILE\/system.271.1072000035\nchannel ORA_DISK_1: restoring datafile 00009 to +DATA\/CORTEX_PHX1HB\/C1CF6DCEA12F134DE0539501000A20C1\/DATAFILE\/sysaux.272.1072000035\nchannel ORA_DISK_1: restoring datafile 00010 to +DATA\/CORTEX_PHX1HB\/C1CF6DCEA12F134DE0539501000A20C1\/DATAFILE\/undotbs1.270.1072000035\nchannel ORA_DISK_1: restoring datafile 00012 to +DATA\/CORTEX_PHX1HB\/C1CF6DCEA12F134DE0539501000A20C1\/DATAFILE\/users.275.1072000383\nchannel ORA_DISK_1: reading from backup piece +RECO\/CORTEX_PHX1HB\/C1CF6DCEA12F134DE0539501000A20C1\/BACKUPSET\/2021_07_13\/nnndn0_cortex_l0_0.299.1077837801\nchannel ORA_DISK_1: piece handle=+RECO\/CORTEX_PHX1HB\/C1CF6DCEA12F134DE0539501000A20C1\/BACKUPSET\/2021_07_13\/nnndn0_cortex_l0_0.299.1077837801 tag=CORTEX_L0\nchannel ORA_DISK_1: restored backup piece 1\nchannel ORA_DISK_1: restore complete, elapsed time: 00:00:15\nFinished restore at 13-JUL-21\n \nRMAN&gt; RECOVER DATABASE;\n \nStarting recover at 13-JUL-21\nusing channel ORA_DISK_1\n \nstarting media recovery\nmedia recovery complete, elapsed time: 00:00:06\n \nFinished recover at 13-JUL-21\n \nRMAN&gt; ALTER DATABASE OPEN;\n \nStatement processed\n \nRMAN&gt; SELECT NAME,OPEN_MODE FROM GV$DATABASE;\n \nNAME      OPEN_MODE\n--------- --------------------\nCORTEX    READ WRITE\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>Podemos realizar backup de nossos DB Systems atrav\u00e9s da OCI Console, API, RMAN ou pelo utilit\u00e1rio DBCLI. Neste artigo, vamos simular a utiliza\u00e7\u00e3o do DBCLI. Este m\u00e9todo nos permite realizar os backups em disco (DISK) ou diretamente no OCI Object Storage (OBJECTSTORE), al\u00e9m de conseguirmos definir o tempo de reten\u00e7\u00e3o dos mesmos (Recovery Window), por [&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,9],"tags":[],"class_list":["post-5783","post","type-post","status-publish","format-standard","hentry","category-backup-recovery","category-oci"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5783","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=5783"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5783\/revisions"}],"predecessor-version":[{"id":9080,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5783\/revisions\/9080"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=5783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=5783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=5783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}