Oracle database backup service is cloud Storage Solution for your Oracle Database Backups. Oracle Database Backup Service provides a low-cost alternative for storing backups in an offsite location. It is an Oracle Public Cloud object-based storage offering that enables you to store your on-premises or cloud-deployed database backups.
If you are familiar with Oracle Recovery Manager (RMAN), it should take only a few minutes for you to start backing up your database to the cloud. Here’s all you need to do:
- Download Oracle Database Cloud Backup Module from OTN Site
- Unzip opc_installer.zip file.
1 2 3 4 5 6 |
[oracle@Clouddb01 opc_installer]$unzip opc_installer.zip Archive: opc_installer.zip inflating: opc_install.jar inflating: opc_readme.txt mkdir wallet Library [oracle@Clouddb01 opc_installer]$mkdir wallet lib |
- Get the service name of your back up subscription. Loin to My services > Oracle database backup service.
- On the right hand corner, make a note of the service/Identity details from the REST Endpoint field.
- Open a putty session to the target DB server. Login as owner of the Oracle RDBMS software.
- Create 2 directories to store the backup module wallet and library.
- Execute the jar file to start the installation process.
1 2 3 4 5 6 7 |
[oracle@Clouddb01 opc_installer]$ java -jar opc_install.jar -host https://storage.aucom-east-1.oraclecloud.com/v1/Storage-identityDomain/ -opcId 'user@gmail.com' -opcPass 'password' -walletDir /tmp/opc_installer/wallet -libDir /tmp/opc_installer/lib Oracle Database Cloud Backup Module Install Tool, build MAIN_2017-08-16 Oracle Database Cloud Backup Module credentials are valid. Oracle Database Cloud Backup Module wallet created in directory /tmp/opc_installer/wallet. Oracle Database Cloud Backup Module initialization file /u01/app/oracle/product/12.1.0/dbhome_1/dbs/opcCDB01.ora created. Downloading Oracle Database Cloud Backup Module Software Library from file opc_linux64.zip. Download complete |
- Configure RMAN tape backup parameters.
1 2 3 4 5 6 7 8 9 |
RMAN> connect target / connected to target database: CDB01 (DBID=1496315960) using target database control file instead of recovery catalog RMAN> configure channel device type sbt parms 'SBT_LIBRARY=/tmp/opc_installer/lib/libopc.so ENV=(OPC_PFILE=/u01/app/oracle/product/12.1.0/dbhome_1/dbs/opcCDB01.ora)'; old RMAN configuration parameters: CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' MAXPIECESIZE 2 G PARMS 'SBT_LIBRARY=libopc.so, ENV=(OPC_PFILE=/u01/app/oracle/product/12.1.0/dbhome_1/dbs/opcCDB01.ora)'; new RMAN configuration parameters: CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/tmp/opc_installer/lib/libopc.so ENV=(OPC_PFILE=/u01/app/oracle/product/12.1.0/dbhome_1/dbs/opcCDB01.ora)'; new RMAN configuration parameters are successfully stored |
- Running the RMAN backup into cloud. Enable encryption. Oracle Database Backup Service can’t be used for non-encrypted backups. For Cloud DB instance, backup can run without encryption.
- Kick off RMAN backup.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
RMAN> set encryption on identified by "Passwd" only; executing command: SET encryption RMAN> backup device type sbt database; Starting backup at 28-NOV-17 allocated channel: ORA_SBT_TAPE_1 channel ORA_SBT_TAPE_1: SID=33 device type=SBT_TAPE channel ORA_SBT_TAPE_1: Oracle Database Backup Service Library VER=3.17.9.5 allocated channel: ORA_SBT_TAPE_2 channel ORA_SBT_TAPE_2: SID=269 device type=SBT_TAPE channel ORA_SBT_TAPE_2: Oracle Database Backup Service Library VER=3.17.9.5 allocated channel: ORA_SBT_TAPE_3 channel ORA_SBT_TAPE_3: SID=32 device type=SBT_TAPE channel ORA_SBT_TAPE_3: Oracle Database Backup Service Library VER=3.17.9.5 allocated channel: ORA_SBT_TAPE_4 channel ORA_SBT_TAPE_4: SID=268 device type=SBT_TAPE channel ORA_SBT_TAPE_4: Oracle Database Backup Service Library VER=3.17.9.5 allocated channel: ORA_SBT_TAPE_5 channel ORA_SBT_TAPE_5: SID=275 device type=SBT_TAPE channel ORA_SBT_TAPE_5: Oracle Database Backup Service Library VER=3.17.9.5 skipping datafile 5; already backed up 1 time(s) skipping datafile 7; already backed up 1 time(s) channel ORA_SBT_TAPE_1: starting full datafile backup set channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set input datafile file number=00001 name=/u02/app/oracle/oradata/CDB01/system01.dbf channel ORA_SBT_TAPE_1: starting piece 1 at 28-NOV-17 channel ORA_SBT_TAPE_2: starting full datafile backup set channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set input datafile file number=00003 name=/u02/app/oracle/oradata/CDB01/sysaux01.dbf channel ORA_SBT_TAPE_2: starting piece 1 at 28-NOV-17 channel ORA_SBT_TAPE_3: starting full datafile backup set channel ORA_SBT_TAPE_3: specifying datafile(s) in backup set input datafile file number=00004 name=/u02/app/oracle/oradata/CDB01/undotbs01.dbf channel ORA_SBT_TAPE_3: starting piece 1 at 28-NOV-17 channel ORA_SBT_TAPE_4: starting full datafile backup set channel ORA_SBT_TAPE_4: specifying datafile(s) in backup set input datafile file number=00009 name=/u02/app/oracle/oradata/CDB01/PDB01/sysaux01.dbf channel ORA_SBT_TAPE_4: starting piece 1 at 28-NOV-17 channel ORA_SBT_TAPE_5: starting full datafile backup set channel ORA_SBT_TAPE_5: specifying datafile(s) in backup set input datafile file number=00008 name=/u02/app/oracle/oradata/CDB01/PDB01/system01.dbf channel ORA_SBT_TAPE_5: starting piece 1 at 28-NOV-17 channel ORA_SBT_TAPE_3: finished piece 1 at 28-NOV-17 piece handle=3iskn2eu_1_1 tag=TAG20171128T142325 comment=API Version 2.0,MMS Version 3.17.9.5 channel ORA_SBT_TAPE_3: backup set complete, elapsed time: 00:00:07 channel ORA_SBT_TAPE_3: starting full datafile backup set channel ORA_SBT_TAPE_3: specifying datafile(s) in backup set input datafile file number=00010 name=/u02/app/oracle/oradata/CDB01/PDB01/PDB01_users01.dbf channel ORA_SBT_TAPE_3: starting piece 1 at 28-NOV-17 channel ORA_SBT_TAPE_2: finished piece 1 at 28-NOV-17 piece handle=3hskn2et_1_1 tag=TAG20171128T142325 comment=API Version 2.0,MMS Version 3.17.9.5 channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:10 channel ORA_SBT_TAPE_2: starting full datafile backup set channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set input datafile file number=00006 name=/u02/app/oracle/oradata/CDB01/users01.dbf channel ORA_SBT_TAPE_2: starting piece 1 at 28-NOV-17 channel ORA_SBT_TAPE_5: finished piece 1 at 28-NOV-17 piece handle=3kskn2eu_1_1 tag=TAG20171128T142325 comment=API Version 2.0,MMS Version 3.17.9.5 channel ORA_SBT_TAPE_5: backup set complete, elapsed time: 00:00:11 channel ORA_SBT_TAPE_3: finished piece 1 at 28-NOV-17 piece handle=3lskn2f5_1_1 tag=TAG20171128T142325 comment=API Version 2.0,MMS Version 3.17.9.5 channel ORA_SBT_TAPE_3: backup set complete, elapsed time: 00:00:04 channel ORA_SBT_TAPE_4: finished piece 1 at 28-NOV-17 piece handle=3jskn2eu_1_1 tag=TAG20171128T142325 comment=API Version 2.0,MMS Version 3.17.9.5 channel ORA_SBT_TAPE_4: backup set complete, elapsed time: 00:00:14 channel ORA_SBT_TAPE_1: finished piece 1 at 28-NOV-17 piece handle=3gskn2et_1_1 tag=TAG20171128T142325 comment=API Version 2.0,MMS Version 3.17.9.5 channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:19 channel ORA_SBT_TAPE_2: finished piece 1 at 28-NOV-17 piece handle=3mskn2f9_1_1 tag=TAG20171128T142325 comment=API Version 2.0,MMS Version 3.17.9.5 channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:07 Finished backup at 28-NOV-17 Starting Control File and SPFILE Autobackup at 28-NOV-17 piece handle=c-1496315960-20171128-08 comment=API Version 2.0,MMS Version 3.17.9.5 Finished Control File and SPFILE Autobackup at 28-NOV-17 |
The container is automatically created for backups with some random Name. To store backups in custom container, include -container parameter and the custom container name when you run the Oracle Database Cloud Backup Module installer.
Restore and Recover Test:
I deleted one data file and restored database from recent backups.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
[oracle@Clouddb01 CDB01]$ rm system01.dbf [oracle@Clouddb01 CDB01]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Tue Nov 28 14:50:03 2017 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, Oracle Label Security, OLAP, Advanced Analytics and Real Application Testing options SQL> shutdown abort ORACLE instance shut down. [oracle@Clouddb01 CDB01]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Tue Nov 28 14:50:32 2017 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to an idle instance. SQL> startup mount ORACLE instance started. Total System Global Area 1946157056 bytes Fixed Size 2925888 bytes Variable Size 553650880 bytes Database Buffers 1308622848 bytes Redo Buffers 80957440 bytes Database mounted. SQL> exit [oracle@Clouddb01 CDB01]$ rman Recovery Manager: Release 12.1.0.2.0 - Production on Tue Nov 28 14:50:49 2017 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. RMAN> connect target / connected to target database: CDB01 (DBID=1496315960, not open) RMAN> RESTORE DATABASE; Starting restore at 28-NOV-17 using target database control file instead of recovery catalog allocated channel: ORA_SBT_TAPE_1 channel ORA_SBT_TAPE_1: SID=237 device type=SBT_TAPE channel ORA_SBT_TAPE_1: Oracle Database Backup Service Library VER=3.17.9.5 allocated channel: ORA_SBT_TAPE_2 channel ORA_SBT_TAPE_2: SID=13 device type=SBT_TAPE channel ORA_SBT_TAPE_2: Oracle Database Backup Service Library VER=3.17.9.5 allocated channel: ORA_SBT_TAPE_3 channel ORA_SBT_TAPE_3: SID=250 device type=SBT_TAPE channel ORA_SBT_TAPE_3: Oracle Database Backup Service Library VER=3.17.9.5 allocated channel: ORA_SBT_TAPE_4 channel ORA_SBT_TAPE_4: SID=14 device type=SBT_TAPE channel ORA_SBT_TAPE_4: Oracle Database Backup Service Library VER=3.17.9.5 allocated channel: ORA_SBT_TAPE_5 channel ORA_SBT_TAPE_5: SID=251 device type=SBT_TAPE channel ORA_SBT_TAPE_5: Oracle Database Backup Service Library VER=3.17.9.5 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=15 device type=DISK skipping datafile 5; already restored to file /u02/app/oracle/oradata/CDB01/pdbseed/system01.dbf skipping datafile 7; already restored to file /u02/app/oracle/oradata/CDB01/pdbseed/sysaux01.dbf channel ORA_SBT_TAPE_1: starting datafile backup set restore channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set channel ORA_SBT_TAPE_1: restoring datafile 00004 to /u02/app/oracle/oradata/CDB01/undotbs01.dbf channel ORA_SBT_TAPE_1: reading from backup piece 3sskn3n8_1_1 channel ORA_SBT_TAPE_2: starting datafile backup set restore channel ORA_SBT_TAPE_2: specifying datafile(s) to restore from backup set channel ORA_SBT_TAPE_2: restoring datafile 00010 to /u02/app/oracle/oradata/CDB01/PDB01/PDB01_users01.dbf channel ORA_SBT_TAPE_2: reading from backup piece 3vskn3nc_1_1 channel ORA_SBT_TAPE_3: starting datafile backup set restore channel ORA_SBT_TAPE_3: specifying datafile(s) to restore from backup set channel ORA_SBT_TAPE_3: restoring datafile 00003 to /u02/app/oracle/oradata/CDB01/sysaux01.dbf channel ORA_SBT_TAPE_3: reading from backup piece 3rskn3n7_1_1 channel ORA_SBT_TAPE_4: starting datafile backup set restore channel ORA_SBT_TAPE_4: specifying datafile(s) to restore from backup set channel ORA_SBT_TAPE_4: restoring datafile 00008 to /u02/app/oracle/oradata/CDB01/PDB01/system01.dbf channel ORA_SBT_TAPE_4: reading from backup piece 3uskn3n8_1_1 channel ORA_SBT_TAPE_5: starting datafile backup set restore channel ORA_SBT_TAPE_5: specifying datafile(s) to restore from backup set channel ORA_SBT_TAPE_5: restoring datafile 00009 to /u02/app/oracle/oradata/CDB01/PDB01/sysaux01.dbf ----- channel ORA_SBT_TAPE_5: restore complete, elapsed time: 00:00:13 channel ORA_SBT_TAPE_1: piece handle=3qskn3n7_1_1 tag=TAG20171128T144455 channel ORA_SBT_TAPE_1: restored backup piece 1 channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:15 Finished restore at 28-NOV-17 RMAN> recover database; Starting recover at 28-NOV-17 using channel ORA_SBT_TAPE_1 using channel ORA_SBT_TAPE_2 using channel ORA_SBT_TAPE_3 using channel ORA_SBT_TAPE_4 using channel ORA_SBT_TAPE_5 starting media recovery media recovery complete, elapsed time: 00:00:01 Finished recover at 28-NOV-17 RMAN> exit Recovery Manager complete. |
Billing for backup Service:
You can get the detail of backups storage usage charges from billing metric. Really useful to know how much storage used for backups.
Reference:
https://docs.oracle.com/en/cloud/paas/db-backup-cloud/csdbb/toc.htm
Leave a Reply