{"id":23259,"date":"2023-03-14T17:55:36","date_gmt":"2023-03-14T16:55:36","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=23259"},"modified":"2023-06-12T10:07:47","modified_gmt":"2023-06-12T08:07:47","slug":"oracle-database-backup-cloud-service","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/","title":{"rendered":"Oracle Database Backup Cloud Service"},"content":{"rendered":"\n<p>In a previous <a href=\"https:\/\/www.dbi-services.com\/blog\/migration-with-data-guard-oracle-on-windows-aws-to-oracle-cloud-infrastructure-oci\/\">blog<\/a> I demonstrated how to migrate an Oracle database from AWS to Oracle OCI using Data Guard. But what if you want to migrate to the Oracle Cloud, but don\u2019t have a direct connection between the Cloud Providers, neither of the database servers are available in the public internet or you are using Oracle Standard Edition where Data Guard isn\u2019t available?<\/p>\n\n\n\n<p>You could backup the database to disk, copy the files by hand to a temporary location, copy from the temporary location to the Oracle Cloud and then restore the database.<\/p>\n\n\n\n<p>Or you could use the Oracle Database Backup Cloud Service to simplify the process. This service allows us to perform RMAN backup \/ restore directly to an Object Store (Bucket) in the Oracle Cloud Infrastructure. And, there\u2019s nothing stopping us from restoring the backups to a different Cloud provider.<\/p>\n\n\n\n<p>In this blog I\u2019ll demonstrate how to backup a database running on AWS to the Oracle Database Backup Cloud Service and then restore the database to a instance running in the Oracle Cloud Infrastructure. This method will also work for migrating on-premise databases to a cloud provider.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Environment<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Original Database &#8211; AWS<\/strong><\/td><td>\ufeff<\/td><\/tr><tr><td>Server<\/td><td>cda-aws-test<\/td><\/tr><tr><td>Operating System<\/td><td>Red Hat Enterprise Linux release 8.5<\/td><\/tr><tr><td>Database Version<\/td><td>19.17.0.0.0<\/td><\/tr><tr><td>Database Name<\/td><td>CDB01<\/td><\/tr><tr><td><strong>Target &#8211; Oracle Cloud Infrastructure<\/strong><\/td><td>\ufeff<\/td><\/tr><tr><td>Server<\/td><td>cda-oci-test<\/td><\/tr><tr><td>Operating System<\/td><td>Oracle Linux Server release 8.6<\/td><\/tr><tr><td>Database Version<\/td><td>19.17.0.0.0<\/td><\/tr><tr><td>Database Name<\/td><td>CDB01<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites &amp; Parameters<\/h2>\n\n\n\n<p>To setup the Oracle Database Cloud Backup Module for OCI you need to collect the following information about your Oracle OCI environment:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td><strong>Parameter Description<\/strong><\/td><td><strong>Parameter<\/strong><\/td><td><strong>Examples used below<\/strong><\/td><\/tr><tr><td>Endpoint of the OCI Object store<br>(Region dependant)<\/td><td>-host<\/td><td>https:\/\/objectstorage.<strong>eu-zurich-1<\/strong>.oraclecloud.com<\/td><\/tr><tr><td>Private Key file of your API Key<\/td><td>-pvtKeyFile<\/td><td>\/u01\/app\/oracle\/admin\/secrets\/id_oiam.pem<\/td><\/tr><tr><td>Public Fingerprint of your API Key<\/td><td>-pubFingerPrint<\/td><td>b5:xx:xx:xx:5f<\/td><\/tr><tr><td>Your Tenancy OCID<\/td><td>-tOCID<\/td><td>ocid1.tenancy.oc1..xxxxxxxxxxxx<br><\/td><\/tr><tr><td>User OCID<\/td><td>-uOCID<\/td><td>ocid1.user.oc1..xxxxxxxxxxxx<\/td><\/tr><tr><td>Compartment OCID for the bucket<\/td><td>-cOCID<\/td><td>ocid1.compartment.oc1..xxxxxxxxxxx<\/td><\/tr><tr><td>Bucket name<\/td><td>-bucket <\/td><td>orabackup<\/td><\/tr><tr><td>Folder where the wallet will be saved<\/td><td>-walletDir<\/td><td>\/u01\/app\/oracle\/admin\/wallet<\/td><\/tr><tr><td>Where to save the libopc.so library<\/td><td>-libDir<\/td><td>$ORACLE_HOME\/lib<\/td><\/tr><tr><td>Where to save the configuration to<\/td><td>-configfile<\/td><td>\/u01\/app\/oracle\/admin\/ocibackup\/ocibackup.conf<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The OCIDs have been masked &amp; shortened for readability and you can find your information in the Oracle OCI console.<\/p>\n\n\n\n<p>Both servers will have to have been granted access through the firewall to the Oracle Object Store, in my example this is https:\/\/objectstorage.eu-zurich-1.oraclecloud.com. You can also configure the backup module to use a HTTP proxy if required.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install the Oracle Database Cloud Backup Module for OCI<\/h2>\n\n\n\n<p>This java module performs the following tasks:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Installs the Media Management Library in $ORACLE_HOME\/lib<\/li>\n\n\n\n<li>Creates a Bucket in the Oracle OCI Compartment if it doesn&#8217;t already exist<\/li>\n\n\n\n<li>Creates a configuration file for use with RMAN<\/li>\n\n\n\n<li>Creates a wallet with the credentials for Oracle OCI<\/li>\n<\/ul>\n\n\n\n<p>The software can be download from Oracle: <a href=\"http:\/\/www.oracle.com\/technetwork\/database\/availability\/oracle-cloud-backup-2162729.html\" target=\"_blank\" rel=\"noreferrer noopener\"><code>https:\/\/www.oracle.com\/database\/technologies\/oracle-cloud-backup-downloads.html<\/code><\/a><\/p>\n\n\n\n<p>Supported Oracle Database Versions (EE,SE,SE1,SE2): 10<em>g<\/em>R2 and above<\/p>\n\n\n\n<p>Supported Platforms (64-bit) : Linux, Solaris, SPARC, Windows, HP-UX, AIX, zLinux<\/p>\n\n\n\n<p>Copy the zip file to <strong>both servers <\/strong>and unpack it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>oracle@cda-aws-test:\/home\/oracle\/ &#091;CDB01] unzip -q opc_installer.zip\r\noracle@cda-aws-test:\/home\/oracle\/ &#091;CDB01] cd opc_installer\/oci_installer\/\r\noracle@cda-aws-test:\/home\/oracle\/opc_installer\/oci_installer\/ &#091;CDB01]$ ls\r\noci_install.jar  oci_readme.txt\r\noracle@cda-aws-test:\/home\/oracle\/opc_installer\/oci_installer\/ &#091;CDB01]\r<\/code><\/pre>\n\n\n\n<p>Run java to install the library and setup the configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ORACLE_HOME\/jdk\/bin\/java -jar oci_install.jar \\\n   -host https:\/\/objectstorage.eu-zurich-1.oraclecloud.com \\\n   -pvtKeyFile \/u01\/app\/oracle\/admin\/secrets\/id_oiam.pem \\\n   -pubFingerPrint b5:xx:xx:xx:5f \\\n   -tOCID ocid1.tenancy.oc1..xxxxxxxxxxxx \\\n   -uOCID ocid1.user.oc1..xxxxxxxxxxxx \\\n   -cOCID ocid1.compartment.oc1..xxxxxxxxxxx \\\n   -bucket orabackup \\\n   -walletDir \/u01\/app\/oracle\/admin\/wallet \\\n   -libDir $ORACLE_HOME\/lib \\\n   -configfile \/u01\/app\/oracle\/admin\/ocibackup\/ocibackup.conf<\/code><\/pre>\n\n\n\n<p>Example: Install the Cloud Backup Module for OCI<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>oracle@cda-aws-test:\/home\/oracle\/opc_installer\/oci_installer\/ &#091;CDB01] $ORACLE_HOME\/jdk\/bin\/java -jar oci_install.jar \\\n&gt;   -host https:\/\/objectstorage.eu-zurich-1.oraclecloud.com \\\n&gt;   -pvtKeyFile \/u01\/app\/oracle\/admin\/secrets\/id_oiam.pem \\\n&gt;   -pubFingerPrint <strong>b5:xx:xx:xx:5f<\/strong> \\\n&gt;   -tOCID <strong>ocid1.tenancy.oc1..xxxxxxxxxxxx<\/strong> \\\n&gt;   -uOCID <strong>ocid1.user.oc1..xxxxxxxxxxxx<\/strong> \\\n&gt;   -cOCID <strong>ocid1.compartment.oc1..xxxxxxxxxxx<\/strong> \\\n&gt;   -bucket orabackup \\\n&gt;   -walletDir \/u01\/app\/oracle\/admin\/wallet \\\n&gt;   -libDir $ORACLE_HOME\/lib \\\n&gt;   -configfile \/u01\/app\/oracle\/admin\/ocibackup\/ocibackup.conf\n\nOracle Database Cloud Backup Module Install Tool, build 19.3.0.0.0DBBKPCSBP_2019-10-16\nOracle Database Cloud Backup Module credentials are valid.\nBackups would be sent to bucket orabackup.\nOracle Database Cloud Backup Module wallet created in directory \/u01\/app\/oracle\/admin\/wallet.\nOracle Database Cloud Backup Module initialization file \/u01\/app\/oracle\/admin\/ocibackup\/ocibackup.conf created.\nDownloading Oracle Database Cloud Backup Module Software Library from Oracle Cloud Infrastructure.\nDownload complete.\noracle@cda-aws-test:\/home\/oracle\/opc_installer\/oci_installer\/ &#091;CDB01]<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Oracle Recovery Manager Configuration<\/h2>\n\n\n\n<p>Now the the module has been installed and configured on the operating system, we now need to setup Oracle Recovery Manager (RMAN) to use it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CONFIGURE DEFAULT DEVICE TYPE TO SBT;\nCONFIGURE CONTROLFILE AUTOBACKUP ON;\nCONFIGURE CHANNEL DEVICE TYPE SBT\n   PARMS='SBT_LIBRARY=libopc.so,\n   SBT_PARMS=(OPC_PFILE=\/u01\/app\/oracle\/admin\/ocibackup\/ocibackup.conf)';\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Take a database backup with RMAN<\/h2>\n\n\n\n<p>We can now take our first backup to the Oracle Cloud. As I\u2019m migrating the database, I\u2019ll take an offline backup. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>All database backups to the Oracle Cloud must be encrypted, otherwise the back fails with the following error:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>channel ORA_SBT_TAPE_1: starting piece 1 at 10-MAR-2023 12:09:57\nRMAN-00571: ===========================================================\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============\nRMAN-00571: ===========================================================\nRMAN-03002: failure of backup plus archivelog command at 03\/10\/2023 12:10:00\nORA-27030: skgfwrt: sbtwrite2 returned error\nORA-19511: non RMAN, but media manager or vendor specific failure, error text:\n   KBHS-01602: backup piece 031mmjsl_3_1_1 is not encrypted\n<\/code><\/pre>\n\n\n\n<p>For simplicity\u2019s sake, I\u2019ll encrypt with the backups with a password and take a full backup including archivelogs:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>shutdown immediate\r\nstartup mount\r\nset encryption on identified by \"orabackup\" only;\r\nbackup incremental level 0 database;\r<\/code><\/pre>\n\n\n\n<p>Example: Database backup:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>oracle@cda-aws-test:\/home\/oracle\/ &#091;CDB01] rman target \/\r\n\r\nRecovery Manager: Release 19.0.0.0.0 - Production on Mon Mar 13 10:53:06 2023\r\nVersion 19.17.0.0.0\r\n\r\nCopyright (c) 1982, 2019, Oracle and\/or its affiliates.  All rights reserved.\r\n\r\nconnected to target database: CDB01 (DBID=1666982163)\r\n\r\nRMAN&gt; shutdown immediate\r\n\r\nusing target database control file instead of recovery catalog\r\ndatabase closed\r\ndatabase dismounted\r\nOracle instance shut down\r\n\r\nRMAN&gt; startup mount\r\n\r\nconnected to target database (not started)\r\nOracle instance started\r\ndatabase mounted\r\n\r\nTotal System Global Area    2147482744 bytes\r\n\r\nFixed Size                     9137272 bytes\r\nVariable Size                520093696 bytes\r\nDatabase Buffers            1610612736 bytes\r\nRedo Buffers                   7639040 bytes\r\n\r\nRMAN&gt; set encryption on identified by \"orabackup\" only;\r\n\r\nexecuting command: SET encryption\r\n\r\nRMAN&gt; backup incremental level 0 database;\r\n\r\nStarting backup at 13-MAR-2023 10:56:30\r\nallocated channel: ORA_SBT_TAPE_1\r\nchannel ORA_SBT_TAPE_1: SID=406 device type=SBT_TAPE\r\nchannel ORA_SBT_TAPE_1: Oracle Database Backup Service Library VER=19.0.0.1\r\nchannel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set\r\nchannel ORA_SBT_TAPE_1: specifying datafile(s) in backup set\r\ninput datafile file number=00005 name=\/u02\/oradata\/CDB01\/undotbs01CDB01.dbf\r\ninput datafile file number=00001 name=\/u02\/oradata\/CDB01\/system01CDB01.dbf\r\ninput datafile file number=00003 name=\/u02\/oradata\/CDB01\/sysaux01CDB01.dbf\r\ninput datafile file number=00007 name=\/u02\/oradata\/CDB01\/users01CDB01.dbf\r\nchannel ORA_SBT_TAPE_1: starting piece 1 at 13-MAR-2023 10:56:33\r\nchannel ORA_SBT_TAPE_1: finished piece 1 at 13-MAR-2023 10:56:59\r\npiece handle=2b1mucn1_75_1_1 tag=TAG20230313T105633 comment=API Version 2.0,MMS Version 19.0.0.1\r\nchannel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:26\r\nchannel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set\r\nchannel ORA_SBT_TAPE_1: specifying datafile(s) in backup set\r\ninput datafile file number=00006 name=\/u02\/oradata\/CDB01\/pdbseed\/undotbs01CDB01.dbf\r\ninput datafile file number=00002 name=\/u02\/oradata\/CDB01\/pdbseed\/system01CDB01.dbf\r\ninput datafile file number=00004 name=\/u02\/oradata\/CDB01\/pdbseed\/sysaux01CDB01.dbf\r\nchannel ORA_SBT_TAPE_1: starting piece 1 at 13-MAR-2023 10:56:59\r\nchannel ORA_SBT_TAPE_1: finished piece 1 at 13-MAR-2023 10:57:14\r\npiece handle=2c1mucnr_76_1_1 tag=TAG20230313T105633 comment=API Version 2.0,MMS Version 19.0.0.1\r\nchannel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:15\r\nFinished backup at 13-MAR-2023 10:57:14\r\n\r\nStarting Control File and SPFILE Autobackup at 13-MAR-2023 10:57:15\r\npiece handle=c-1666982163-20230313-01 comment=API Version 2.0,MMS Version 19.0.0.1\r\nFinished Control File and SPFILE Autobackup at 13-MAR-2023 10:57:18\r\n\r\nRMAN&gt;\r<\/code><\/pre>\n\n\n\n<p>These backup files are visible in the Oracle Cloud Storage Bucket:<\/p>\n\n\n\n<figure class=\"wp-block-image alignwide size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"839\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/03\/Capture-1024x839.png\" alt=\"\" class=\"wp-image-23277\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/03\/Capture-1024x839.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/03\/Capture-300x246.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/03\/Capture-768x629.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/03\/Capture.png 1027w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Restore the Database to an Oracle OCI Instance<\/h2>\n\n\n\n<p>On the new server the Oracle Database Cloud Backup Module for OCI should have been installed in the Oracle Home which is being used for the restore. <\/p>\n\n\n\n<p>As we don&#8217;t have a spfile or controlfiles for the database, we can&#8217;t save the RMAN SBT Library configuration, so we&#8217;ll have to allocate the RMAN channel in each restore manually, until we have restored the controlfiles.<\/p>\n\n\n\n<p>Restore the spfile:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rman target \/\r\nstartup nomount\r\n\r\nset decryption identified by \"orabackup\";\r\nset dbid=1666982163;\r\n\r\nrun {\r\n   allocate channel oci1 device type sbt parms \r\n      'SBT_LIBRARY=libopc.so ENV=(OPC_PFILE=\/u01\/app\/oracle\/admin\/ocibackup\/ocibackup.conf)';\r\n   restore spfile to pfile '\/u01\/app\/oracle\/product\/19.0.0\/dbhome_1\/dbs\/initCDB01.ora'\r\n      from autobackup;\r\n   release channel oci1;\r\n}\r<\/code><\/pre>\n\n\n\n<p>Example: Restore spfile<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>oracle@cda-oci-test:\/home\/oracle\/ &#091;CDB01]  rman target \/\r\n\r\nRecovery Manager: Release 19.0.0.0.0 - Production on Mon Mar 13 10:16:49 2023\r\nVersion 19.17.0.0.0\r\n\r\nCopyright (c) 1982, 2019, Oracle and\/or its affiliates.  All rights reserved.\r\n\r\nconnected to target database (not started)\r\n\r\nRMAN&gt; startup nomount\r\n\r\nstartup failed: ORA-01078: failure in processing system parameters\r\nLRM-00109: could not open parameter file '\/u01\/app\/oracle\/product\/19.0.0\/dbhome_1\/dbs\/initCDB01.ora'\r\n\r\nstarting Oracle instance without parameter file for retrieval of spfile\r\nOracle instance started\r\n\r\nTotal System Global Area    1073737800 bytes\r\n\r\nFixed Size                     8904776 bytes\r\nVariable Size                276824064 bytes\r\nDatabase Buffers             780140544 bytes\r\nRedo Buffers                   7868416 bytes\r\n\r\nRMAN&gt; set decryption identified by \"orabackup\";\r\n\r\nexecuting command: SET decryption\r\nusing target database control file instead of recovery catalog\r\n\r\nRMAN&gt; set dbid=1666982163;\r\n\r\nexecuting command: SET DBID\r\n\r\nRMAN&gt; run {\r\n2&gt;    allocate channel oci1 device type sbt parms\r\n3&gt;       'SBT_LIBRARY=libopc.so ENV=(OPC_PFILE=\/u01\/app\/oracle\/admin\/ocibackup\/ocibackup.conf)';\r\n4&gt;    restore spfile to pfile '\/u01\/app\/oracle\/product\/19.0.0\/dbhome_1\/dbs\/initCDB01.ora'\r\n5&gt;       from autobackup;\r\n6&gt;    release channel oci1;\r\n7&gt; }\r\n\r\nallocated channel: oci1\r\nchannel oci1: SID=19 device type=SBT_TAPE\r\nchannel oci1: Oracle Database Backup Service Library VER=19.0.0.1\r\n\r\nStarting restore at 13-MAR-2023 10:17:58\r\n\r\nchannel oci1: looking for AUTOBACKUP on day: 20230313\r\nchannel oci1: AUTOBACKUP found: c-1666982163-20230313-01\r\nchannel oci1: restoring spfile from AUTOBACKUP c-1666982163-20230313-01\r\nchannel oci1: SPFILE restore from AUTOBACKUP complete\r\nFinished restore at 13-MAR-2023 10:18:04\r\n\r\nreleased channel: oci1\r\n\r\nRMAN&gt;\r<\/code><\/pre>\n\n\n\n<p>Stop the database and modify the restored init.ora if required. As both my servers have the same filesystem structure, I can just restart the database with the restored init.ora and restore the control file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>shutdown immediate\r\nstartup nomount pfile=\/u01\/app\/oracle\/product\/19.0.0\/dbhome_1\/dbs\/initCDB01.ora\r\nset decryption identified by \"orabackup\";\r\nset dbid=1666982163;\r\nrun {\r\n   allocate channel oci1 device type sbt parms \r\n      'SBT_LIBRARY=libopc.so ENV=(OPC_PFILE=\/u01\/app\/oracle\/admin\/ocibackup\/ocibackup.conf)';\r\n   restore controlfile from autobackup;\r\n   release channel oci1;\r\n}\r\nalter database mount;\r<\/code><\/pre>\n\n\n\n<p>Example: Restore controlfile<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RMAN&gt; shutdown immediate\r\nOracle instance shut down\r\nRMAN&gt; startup nomount pfile=\/u01\/app\/oracle\/product\/19.0.0\/dbhome_1\/dbs\/initCDB01.ora\r\n\r\nconnected to target database (not started)\r\nOracle instance started\r\n\r\nTotal System Global Area    2147482744 bytes\r\n\r\nFixed Size                     9137272 bytes\r\nVariable Size                520093696 bytes\r\nDatabase Buffers            1610612736 bytes\r\nRedo Buffers                   7639040 bytes\r\n\r\nRMAN&gt; set decryption identified by \"orabackup\";\r\n\r\nexecuting command: SET decryption\r\n\r\nRMAN&gt; set dbid=1666982163;\r\n\r\nexecuting command: SET DBID\r\n\r\nRMAN&gt; run {\r\n2&gt;    allocate channel oci1 device type sbt parms\r\n3&gt;       'SBT_LIBRARY=libopc.so ENV=(OPC_PFILE=\/u01\/app\/oracle\/admin\/ocibackup\/ocibackup.conf)';\r\n4&gt;    restore controlfile from autobackup;\r\n5&gt;    release channel oci1;\r\n6&gt; }\r\n\r\nallocated channel: oci1\r\nchannel oci1: SID=20 device type=SBT_TAPE\r\nchannel oci1: Oracle Database Backup Service Library VER=19.0.0.1\r\n\r\nStarting restore at 13-MAR-2023 10:19:11\r\n\r\nchannel oci1: looking for AUTOBACKUP on day: 20230313\r\nchannel oci1: AUTOBACKUP found: c-1666982163-20230313-01\r\nchannel oci1: restoring control file from AUTOBACKUP c-1666982163-20230313-01\r\nchannel oci1: control file restore from AUTOBACKUP complete\r\noutput file name=\/u02\/oradata\/CDB01\/control01CDB01.dbf\r\noutput file name=\/u03\/oradata\/CDB01\/control02CDB01.dbf\r\noutput file name=\/u04\/oradata\/CDB01\/control03CDB01.dbf\r\nFinished restore at 13-MAR-2023 10:19:19\r\n\r\nreleased channel: oci1\r\n\r\nRMAN&gt; alter database mount;\r\n\r\nStatement processed\r\n\r\nRMAN&gt;<\/code><\/pre>\n\n\n\n<p>Now we can set the default device and it\u2019s parameters:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CONFIGURE CHANNEL DEVICE TYPE sbt \n   PARMS='SBT_LIBRARY=libopc.so,\n   SBT_PARMS=(OPC_PFILE=\/u01\/app\/oracle\/admin\/ocibackup\/ocibackup.conf)';<\/code><\/pre>\n\n\n\n<p>The database can be restored on the target system with normal RMAN commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>restore database;\r\nalter database open resetlogs;\r<\/code><\/pre>\n\n\n\n<p>Example: Database restore and recover<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RMAN&gt; restore database;\r\n\r\nStarting restore at 13-MAR-2023 10:19:51\r\nusing channel ORA_SBT_TAPE_1\r\nallocated channel: ORA_DISK_1\r\nchannel ORA_DISK_1: SID=409 device type=DISK\r\n\r\nchannel ORA_SBT_TAPE_1: starting datafile backup set restore\r\nchannel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set\r\nchannel ORA_SBT_TAPE_1: restoring datafile 00001 to \/u02\/oradata\/CDB01\/system01CDB01.dbf\r\nchannel ORA_SBT_TAPE_1: restoring datafile 00003 to \/u02\/oradata\/CDB01\/sysaux01CDB01.dbf\r\nchannel ORA_SBT_TAPE_1: restoring datafile 00005 to \/u02\/oradata\/CDB01\/undotbs01CDB01.dbf\r\nchannel ORA_SBT_TAPE_1: restoring datafile 00007 to \/u02\/oradata\/CDB01\/users01CDB01.dbf\r\nchannel ORA_SBT_TAPE_1: reading from backup piece 2b1mucn1_75_1_1\r\nchannel ORA_SBT_TAPE_1: piece handle=2b1mucn1_75_1_1 tag=TAG20230313T105633\r\nchannel ORA_SBT_TAPE_1: restored backup piece 1\r\nchannel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:01:15\r\nchannel ORA_SBT_TAPE_1: starting datafile backup set restore\r\nchannel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set\r\nchannel ORA_SBT_TAPE_1: restoring datafile 00002 to \/u02\/oradata\/CDB01\/pdbseed\/system01CDB01.dbf\r\nchannel ORA_SBT_TAPE_1: restoring datafile 00004 to \/u02\/oradata\/CDB01\/pdbseed\/sysaux01CDB01.dbf\r\nchannel ORA_SBT_TAPE_1: restoring datafile 00006 to \/u02\/oradata\/CDB01\/pdbseed\/undotbs01CDB01.dbf\r\nchannel ORA_SBT_TAPE_1: reading from backup piece 2c1mucnr_76_1_1\r\nchannel ORA_SBT_TAPE_1: piece handle=2c1mucnr_76_1_1 tag=TAG20230313T105633\r\nchannel ORA_SBT_TAPE_1: restored backup piece 1\r\nchannel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:35\r\nFinished restore at 13-MAR-2023 10:21:42\r\n\r\nRMAN&gt; alter database open resetlogs;\r\n\r\nStatement processed\r\n\r\nRMAN&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The Oracle Database Backup Cloud Service has been around for a while and provides a simple to setup and use cloud backup for your on-premise or cloud hosted databases.<\/p>\n\n\n\n<p>Once stored in the Oracle Cloud Object Store the backups can be moved to different storage tiers to reduce costs and they can even be replicated to other Oracle Cloud Regions using OCI Object Storage Replication to increase your disaster recovery capabilities.<\/p>\n\n\n\n<p>And as we have seen, it can also be used to migrate databases between cloud providers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a previous blog I demonstrated how to migrate an Oracle database from AWS to Oracle OCI using Data Guard. But what if you want to migrate to the Oracle Cloud, but don\u2019t have a direct connection between the Cloud Providers, neither of the database servers are available in the public internet or you are [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1865,955,198,59],"tags":[133,202,135,1375,96],"type_dbi":[],"class_list":["post-23259","post","type-post","status-publish","format-standard","hentry","category-aws","category-cloud","category-database-management","category-oracle","tag-aws","tag-backup","tag-cloud","tag-oci","tag-oracle"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Oracle Database Backup Cloud Service - dbi Blog<\/title>\n<meta name=\"description\" content=\"Migrating Oracle Databases between Cloud Providers? Here&#039;s an example using the Oracle Cloud Backup Service.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Oracle Database Backup Cloud Service\" \/>\n<meta property=\"og:description\" content=\"Migrating Oracle Databases between Cloud Providers? Here&#039;s an example using the Oracle Cloud Backup Service.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-14T16:55:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-12T08:07:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/03\/Capture-1024x839.png\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"Oracle Database Backup Cloud Service\",\"datePublished\":\"2023-03-14T16:55:36+00:00\",\"dateModified\":\"2023-06-12T08:07:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/\"},\"wordCount\":896,\"commentCount\":2,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/03\/Capture-1024x839.png\",\"keywords\":[\"AWS\",\"Backup\",\"Cloud\",\"OCI\",\"Oracle\"],\"articleSection\":[\"AWS\",\"Cloud\",\"Database management\",\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/\",\"name\":\"Oracle Database Backup Cloud Service - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/03\/Capture-1024x839.png\",\"datePublished\":\"2023-03-14T16:55:36+00:00\",\"dateModified\":\"2023-06-12T08:07:47+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"description\":\"Migrating Oracle Databases between Cloud Providers? Here's an example using the Oracle Cloud Backup Service.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/03\/Capture-1024x839.png\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/03\/Capture-1024x839.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Oracle Database Backup Cloud Service\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Oracle Database Backup Cloud Service - dbi Blog","description":"Migrating Oracle Databases between Cloud Providers? Here's an example using the Oracle Cloud Backup Service.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/","og_locale":"en_US","og_type":"article","og_title":"Oracle Database Backup Cloud Service","og_description":"Migrating Oracle Databases between Cloud Providers? Here's an example using the Oracle Cloud Backup Service.","og_url":"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/","og_site_name":"dbi Blog","article_published_time":"2023-03-14T16:55:36+00:00","article_modified_time":"2023-06-12T08:07:47+00:00","og_image":[{"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/03\/Capture-1024x839.png","type":"","width":"","height":""}],"author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"Oracle Database Backup Cloud Service","datePublished":"2023-03-14T16:55:36+00:00","dateModified":"2023-06-12T08:07:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/"},"wordCount":896,"commentCount":2,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/03\/Capture-1024x839.png","keywords":["AWS","Backup","Cloud","OCI","Oracle"],"articleSection":["AWS","Cloud","Database management","Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/","url":"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/","name":"Oracle Database Backup Cloud Service - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/03\/Capture-1024x839.png","datePublished":"2023-03-14T16:55:36+00:00","dateModified":"2023-06-12T08:07:47+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"description":"Migrating Oracle Databases between Cloud Providers? Here's an example using the Oracle Cloud Backup Service.","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/03\/Capture-1024x839.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/03\/Capture-1024x839.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-database-backup-cloud-service\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Oracle Database Backup Cloud Service"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/23259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=23259"}],"version-history":[{"count":19,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/23259\/revisions"}],"predecessor-version":[{"id":23307,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/23259\/revisions\/23307"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=23259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=23259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=23259"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=23259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}