Saturday, April 7, 2018

Configure Oracle Database Backup Cloud Service

Download opc_installer.zip from OTN and unzip.

[oracle@db-cld-inst-001 opc]$ unzip opc_installer.zip
[oracle@db-cld-inst-001 opc]$ ls
opc_installer.zip  opc_install.jar  opc_readme.txt
[oracle@db-cld-inst-001 opc]$ mkdir lib
[oracle@db-cld-inst-001 opc]$ mkdir wallet
[oracle@db-cld-inst-001 opc]$ ls
lib  opc_installer.zip  opc_install.jar  opc_readme.txt  wallet

[oracle@db-cld-inst-001 opc]$ java -jar opc_install.jar -serviceName Storage -identityDomain gse00112591 -opcId 'your account id' -opcPass 'unFair@5FOrd' -walletDir /u01/app/oracle/opc/wallet -libDir /u01/app/oracle/opc/lib
Oracle Database Cloud Backup Module Install Tool, build 12.2.0.1.0DBBKPCSBP_2017-11-28
Oracle Database Cloud Backup Module credentials are valid.
Oracle Database Cloud Backup Module wallet created in directory /u01/app/oracle/opc/wallet.
Oracle Database Cloud Backup Module initialization file /u01/app/oracle/product/12.2.0/dbhome_1/dbs/opcKTSDB02.ora created.
Downloading Oracle Database Cloud Backup Module Software Library from file opc_linux64.zip.
Download complete.

[oracle@db-cld-inst-001 lib]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Fri Apr 6 17:31:44 2018

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

connected to target database: KTSDB02 (DBID=2214310033)

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name KTSDB02 are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 5 BACKUP TYPE TO BACKUPSET;
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' MAXPIECESIZE 2 G PARMS  'SBT_LIBRARY=libopc.so, ENV=(OPC_PFILE=/u01/app/oracle/product/12.2.0/dbhome_1/dbs/opcKTSDB02.ora)';
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2 G;
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE ON;
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.2.0/dbhome_1/dbs/snapcf_KTSDB02.f'; # default

RMAN> configure default device type to sbt;

old RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
new RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
new RMAN configuration parameters are successfully stored


RMAN>  configure device type sbt parallelism 4;

old RMAN configuration parameters:
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 5 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters are successfully stored


RMAN> configure channel device type sbt parms='SBT_LIBRARY=/u01/app/oracle/opc/lib/libopc.so,SBT_PARMS=(OPC_PFILE=/u01/app/oracle/product/12.2.0/dbhome_1/dbs/opcKTSDB02.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.2.0/dbhome_1/dbs/opcKTSDB02.ora)';
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS  'SBT_LIBRARY=/u01/app/oracle/opc/lib/libopc.so,SBT_PARMS=(OPC_PFILE=/u01/app/oracle/product/12.2.0/dbhome_1/dbs/opcKTSDB02.ora)';
new RMAN configuration parameters are successfully stored


RMAN> configure compression algorithm 'MEDIUM';

new RMAN configuration parameters:
CONFIGURE COMPRESSION ALGORITHM 'MEDIUM' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;
new RMAN configuration parameters are successfully stored

RMAN> set encryption on identified by "Manager#123" only;

executing command: SET encryption

RMAN> show all;

RMAN configuration parameters for database with db_unique_name KTSDB02 are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS  'SBT_LIBRARY=/u01/app/oracle/opc/lib/libopc.so,SBT_PARMS=(OPC_PFILE=/u01/app/oracle/product/12.2.0/dbhome_1/dbs/opcKTSDB02.ora)';
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2 G;
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE ON;
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'MEDIUM' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;
CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.2.0/dbhome_1/dbs/snapcf_KTSDB02.f'; # default

RMAN> backup database plus archivelog;

Starting backup at 07-APR-18
current log archived
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: SID=40 device type=SBT_TAPE
channel ORA_SBT_TAPE_1: Oracle Database Backup Service Library VER=12.2.0.1
allocated channel: ORA_SBT_TAPE_2
channel ORA_SBT_TAPE_2: SID=252 device type=SBT_TAPE
channel ORA_SBT_TAPE_2: Oracle Database Backup Service Library VER=12.2.0.1
allocated channel: ORA_SBT_TAPE_3
channel ORA_SBT_TAPE_3: SID=31 device type=SBT_TAPE
channel ORA_SBT_TAPE_3: Oracle Database Backup Service Library VER=12.2.0.1
allocated channel: ORA_SBT_TAPE_4
channel ORA_SBT_TAPE_4: SID=49 device type=SBT_TAPE
channel ORA_SBT_TAPE_4: Oracle Database Backup Service Library VER=12.2.0.1
skipping archived logs of thread 1 from sequence 1 to 50; already backed up
channel ORA_SBT_TAPE_1: starting archived log backup set
channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=51 RECID=51 STAMP=972812031
channel ORA_SBT_TAPE_1: starting piece 1 at 07-APR-18
channel ORA_SBT_TAPE_1: finished piece 1 at 07-APR-18
piece handle=4hsvnrp0_1_1 tag=TAG20180407T093424 comment=API Version 2.0,MMS Version 12.2.0.1
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:35
Finished backup at 07-APR-18

Starting backup at 07-APR-18
using channel ORA_SBT_TAPE_1
using channel ORA_SBT_TAPE_2
using channel ORA_SBT_TAPE_3
using channel ORA_SBT_TAPE_4
skipping datafile 5; already backed up 1 time(s)
skipping datafile 6; already backed up 1 time(s)
skipping datafile 8; 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/KTSDB02/system01.dbf
channel ORA_SBT_TAPE_1: starting piece 1 at 07-APR-18
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=00013 name=/u02/app/oracle/oradata/KTSDB02/PDB1/sysaux01.dbf
channel ORA_SBT_TAPE_2: starting piece 1 at 07-APR-18
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=00003 name=/u02/app/oracle/oradata/KTSDB02/sysaux01.dbf
channel ORA_SBT_TAPE_3: starting piece 1 at 07-APR-18
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=00012 name=/u02/app/oracle/oradata/KTSDB02/PDB1/system01.dbf
input datafile file number=00015 name=/u02/app/oracle/oradata/KTSDB02/PDB1/PDB1_users01.dbf
input datafile file number=00019 name=/u02/app/oracle/oradata/SP390751824_svctbl.dbf
channel ORA_SBT_TAPE_4: starting piece 1 at 07-APR-18
channel ORA_SBT_TAPE_4: finished piece 1 at 07-APR-18
piece handle=4lsvnrq5_1_1 tag=TAG20180407T093459 comment=API Version 2.0,MMS Version 12.2.0.1
channel ORA_SBT_TAPE_4: backup set complete, elapsed time: 00:00:55
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=00014 name=/u02/app/oracle/oradata/KTSDB02/PDB1/undotbs01.dbf
input datafile file number=00018 name=/u02/app/oracle/oradata/SP390751824_wlsservices.dbf
input datafile file number=00020 name=/u02/app/oracle/oradata/SP390751824_ias_opss.dbf
channel ORA_SBT_TAPE_4: starting piece 1 at 07-APR-18
channel ORA_SBT_TAPE_2: finished piece 1 at 07-APR-18
piece handle=4jsvnrq4_1_1 tag=TAG20180407T093459 comment=API Version 2.0,MMS Version 12.2.0.1
channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:01:12
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=00004 name=/u02/app/oracle/oradata/KTSDB02/undotbs01.dbf
channel ORA_SBT_TAPE_2: starting piece 1 at 07-APR-18
channel ORA_SBT_TAPE_3: finished piece 1 at 07-APR-18
piece handle=4ksvnrq4_1_1 tag=TAG20180407T093459 comment=API Version 2.0,MMS Version 12.2.0.1
channel ORA_SBT_TAPE_3: backup set complete, elapsed time: 00:01:11
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=00016 name=/u02/app/oracle/oradata/SP390751824_mds.dbf
input datafile file number=00021 name=/u02/app/oracle/oradata/SP390751824_UMS.dbf
input datafile file number=00017 name=/u02/app/oracle/oradata/SP390751824_iau.dbf
channel ORA_SBT_TAPE_3: starting piece 1 at 07-APR-18
channel ORA_SBT_TAPE_1: finished piece 1 at 07-APR-18
piece handle=4isvnrq4_1_1 tag=TAG20180407T093459 comment=API Version 2.0,MMS Version 12.2.0.1
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:01:15
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=00007 name=/u02/app/oracle/oradata/KTSDB02/users01.dbf
channel ORA_SBT_TAPE_1: starting piece 1 at 07-APR-18
channel ORA_SBT_TAPE_4: finished piece 1 at 07-APR-18
piece handle=4msvnrrt_1_1 tag=TAG20180407T093459 comment=API Version 2.0,MMS Version 12.2.0.1
channel ORA_SBT_TAPE_4: backup set complete, elapsed time: 00:00:25
channel ORA_SBT_TAPE_1: finished piece 1 at 07-APR-18
piece handle=4psvnrsf_1_1 tag=TAG20180407T093459 comment=API Version 2.0,MMS Version 12.2.0.1
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
channel ORA_SBT_TAPE_2: finished piece 1 at 07-APR-18
piece handle=4nsvnrsc_1_1 tag=TAG20180407T093459 comment=API Version 2.0,MMS Version 12.2.0.1
channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:28
channel ORA_SBT_TAPE_3: finished piece 1 at 07-APR-18
piece handle=4osvnrsc_1_1 tag=TAG20180407T093459 comment=API Version 2.0,MMS Version 12.2.0.1
channel ORA_SBT_TAPE_3: backup set complete, elapsed time: 00:00:28
Finished backup at 07-APR-18

Starting backup at 07-APR-18
current log archived
using channel ORA_SBT_TAPE_1
using channel ORA_SBT_TAPE_2
using channel ORA_SBT_TAPE_3
using channel ORA_SBT_TAPE_4
channel ORA_SBT_TAPE_1: starting archived log backup set
channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=52 RECID=52 STAMP=972812201
channel ORA_SBT_TAPE_1: starting piece 1 at 07-APR-18
channel ORA_SBT_TAPE_1: finished piece 1 at 07-APR-18
piece handle=4qsvnrt9_1_1 tag=TAG20180407T093641 comment=API Version 2.0,MMS Version 12.2.0.1
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
Finished backup at 07-APR-18

Starting Control File and SPFILE Autobackup at 07-APR-18
piece handle=c-2214310033-20180407-18 comment=API Version 2.0,MMS Version 12.2.0.1
Finished Control File and SPFILE Autobackup at 07-APR-18

3 comments:

  1. is it possible to take a disk backup.
    can you please provide steps to configure disk backup in cloud

    ReplyDelete
  2. Great post. if you looking India VPS Hosting visit this link.

    ReplyDelete
  3. This is a really useful blog about Database Backup Cloud Service. I really enjoyed reading this blog. It was well explained and structured with perfection. Thanks for sharing!!!
    Visit here...
    Web Hosting
    backup on cloud
    Backup Storage

    ReplyDelete