wordpress.com  · web view2017. 11. 3. · piece handle=01sike5r_1_1 tag=tag20171103t045228...

12
Oracle Database Backup to Cloud: Amazon Simple Storage Service (S3) Login to AWS and create bucket

Upload: others

Post on 18-Aug-2021

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WordPress.com  · Web view2017. 11. 3. · piece handle=01sike5r_1_1 tag=TAG20171103T045228 comment=API Version 2.0,MMS Version 3.17.7.27 channel ch1: backup set complete, elapsed

Oracle Database Backup to Cloud:Amazon Simple Storage Service (S3)Login to AWS and create bucket

Page 2: WordPress.com  · Web view2017. 11. 3. · piece handle=01sike5r_1_1 tag=TAG20171103T045228 comment=API Version 2.0,MMS Version 3.17.7.27 channel ch1: backup set complete, elapsed
Page 3: WordPress.com  · Web view2017. 11. 3. · piece handle=01sike5r_1_1 tag=TAG20171103T045228 comment=API Version 2.0,MMS Version 3.17.7.27 channel ch1: backup set complete, elapsed
Page 4: WordPress.com  · Web view2017. 11. 3. · piece handle=01sike5r_1_1 tag=TAG20171103T045228 comment=API Version 2.0,MMS Version 3.17.7.27 channel ch1: backup set complete, elapsed

bash-4.2$ unzip osbws_installer.zipArchive: osbws_installer.zip inflating: osbws_install.jar inflating: osbws_readme.txtbash-4.2$ pwd/oem13c/oracle/osbjarbash-4.2$ chmod 777 osbws_install.jarbash-4.2$ ls -tlrtotal 2804-rwxrwxrwx. 1 oracle dba 2866957 Jun 1 08:27 osbws_install.jarbash-4.2$

Page 5: WordPress.com  · Web view2017. 11. 3. · piece handle=01sike5r_1_1 tag=TAG20171103T045228 comment=API Version 2.0,MMS Version 3.17.7.27 channel ch1: backup set complete, elapsed

The OSB Cloud Module for Amazon S3 Installer

bash-4.2$ java -jar osbws_install.jarOracle Secure Backup Web Service Install Tool, build 2017-06-01No arguments suppliedUsage: java -jar osbws_install.jar -AWSID: AWS Access Key ID -AWSKey: AWS Secret Access Key -IAMRole: AWS IAM role name -IAMRoleMetaUri: Metadata URI for the specified IAM role -awsEndPoint: non default host name -awsPort: non default HTTP/HTTPS port -location: Location to store backups -useHttps: setup HTTPS -useSigV2: setup authentication scheme -walletDir: Directory to store wallet -trustedCerts: SSL certificates to be imported -configFile: File name of config file -libDir: Directory to store library -libPlatform: Platform of library to download -proxyHost: HTTP proxy host -proxyPort: HTTP proxy port -proxyID: HTTP proxy userid, if needed -proxyPass: HTTP proxy password, if needed -argFile: File name of arguments file -help: Print this usage information and exit

Oracle Secure Backup Web Service install tool....

Create secret and access key which will used for osbws_install.jar

bash-4.2$

Page 6: WordPress.com  · Web view2017. 11. 3. · piece handle=01sike5r_1_1 tag=TAG20171103T045228 comment=API Version 2.0,MMS Version 3.17.7.27 channel ch1: backup set complete, elapsed
Page 7: WordPress.com  · Web view2017. 11. 3. · piece handle=01sike5r_1_1 tag=TAG20171103T045228 comment=API Version 2.0,MMS Version 3.17.7.27 channel ch1: backup set complete, elapsed

Create OSB Cloud Module for Amazon S3 Installer ScriptAKIAIVZ7I3XPJNI5DZCQ Access Key IDn3GzLdge+7g1c8Xc6G+QkRmrMMwnIRxkZI0+tvNk Secret Access Key

bash-4.2$ java -jar osbws_install.jar -AWSID AKIAIVZ7I3XPJNI5DZCQ -AWSKey n3GzLdge+7g1c8Xc6G+QkRmrMMwnIRxkZI0+tvNk -otnUser [email protected] -otnPass Databa#00 -walletDir $ORACLE_HOME/dbs/osbws_wallet -libDir $ORACLE_HOME/lib -configFile $ORACLE_HOME/dbs/osbwsorcl.ora -proxyHost 10.78.0.111 -proxyPort 8080Oracle Secure Backup Web Service Install Tool, build 2017-06-01AWS credentials are valid.Oracle Secure Backup Web Service wallet created in directory /oem13c/oracle/12.2.0/product/dbs/osbws_wallet.Oracle Secure Backup Web Service initialization file /oem13c/oracle/12.2.0/product/dbs/osbwsorcl.ora created.Downloading Oracle Secure Backup Web Service Software Library from file osbws_linux64.zip.Download complete.bash-4.2$

Page 8: WordPress.com  · Web view2017. 11. 3. · piece handle=01sike5r_1_1 tag=TAG20171103T045228 comment=API Version 2.0,MMS Version 3.17.7.27 channel ch1: backup set complete, elapsed

RMAN> configure channel device type sbt parms'SBT_LIBRARY=/oem13c/oracle/12.2.0/product/lib/libosbws.soSBT_PARMS=(OSB_WS_PFILE=/oem13c/oracle/12.2.0/product/dbs/osbwsorcl.ora)';2> 3>

using target database control file instead of recovery catalognew RMAN configuration parameters:CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/oem13c/oracle/12.2.0/product/lib/libosbws.soSBT_PARMS=(OSB_WS_PFILE=/oem13c/oracle/12.2.0/product/dbs/osbwsorcl.ora)';new RMAN configuration parameters are successfully stored

RMAN> configure default device type to 'sbt_tape';

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

RMAN> configure archivelog deletion policy to backed up 1 times to 'tape';

new RMAN configuration parameters:CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO 'TAPE';new RMAN configuration parameters are successfully stored

bash-4.2$ sbttest osbws_readme.txt -dbname orclThe sbt function pointers are loaded from oracle.static library.libobk.so could not be loaded. Check that it is installed

bash-4.2$ ln -s $ORACLE_HOME/lib/libosbws.so $ORACLE_HOME/lib/libobk.so

bash-4.2$ sbttest osbws_readme.txt -dbname orclThe sbt function pointers are loaded from libobk.so library.-- sbtinit succeeded-- sbtinit (2nd time) succeededsbtinit: vendor description string=Oracle Secure Backupsbtinit: Media manager is version 3.17.7.27sbtinit: Media manager supports SBT API version 2.0sbtinit: allocated sbt context area of 1072 bytes-- sbtinit2 succeeded-- regular_backup_restore starts ................................-- sbtbackup succeededwrite 100 blocks-- sbtwrite2 succeeded-- sbtclose2 succeededsbtinfo2: SBTBFINFO_NAME=osbws_readme.txtsbtinfo2: SBTBFINFO_COMMENT=Oracle Secure Backup Web Services Library

Page 9: WordPress.com  · Web view2017. 11. 3. · piece handle=01sike5r_1_1 tag=TAG20171103T045228 comment=API Version 2.0,MMS Version 3.17.7.27 channel ch1: backup set complete, elapsed

sbtinfo2: SBTBFINFO_METHOD=streamsbtinfo2: SBTBFINFO_ORDER=random accesssbtinfo2: SBTBFINFO_SHARE=multiple userssbtinfo2: SBTBFINFO_LABEL=s3.amazonaws.com/oracle-data-bhoiteam-1-- sbtinfo2 succeeded-- sbtrestore succeededfile was created by this program: seed=439319272, blk_size=16384, blk_count=100read 100 buffers-- sbtread2 succeeded-- sbtclose2 succeeded-- sbtremove2 succeeded-- regular_backup_restore ends ................................-- sbtcommand succeededproxy copy is not supported-- sbtend succeeded*** The SBT API test was successful ***

bash-4.2$ strings $ORACLE_HOME/lib/libosbws.so | grep '^OSB_' | sortOSB_WS_BUCKETOSB_WS_CHUNK_SIZEOSB_WS_HOSTOSB_WS_IAM_ROLEOSB_WS_IAM_ROLE_META_URIOSB_WS_LICENSE_IDOSB_WS_LICENSE_MAX_SESSIONSOSB_WS_LOCATIONOSB_WS_PFILEOSB_WS_PRIVATE_CLOUDOSB_WS_PROXYOSB_WS_VIRTUAL_HOSTOSB_WS_WALLET

bash-4.2$ strings $ORACLE_HOME/lib/libosbws.so | grep '^_OSB_' | sort_OSB_WS_100_CONTINUE_OSB_WS_ALLOCBUF_DISABLE_OSB_WS_AUTH_SCHEME_OSB_WS_BUFFER_READ_OSB_WS_BUFFER_WRITE_OSB_WS_CHECKER_RETENTION_TIME_OSB_WS_CLEANER_OSB_WS_CLEANER_RETENTION_TIME_OSB_WS_CONNECT_TIMEOUT_OSB_WS_DEFERRED_DELETE_OSB_WS_EVENT_OSB_WS_FOLLOW_REDIRECT_OSB_WS_NO_PROXY_OSB_WS_NO_SSL

Page 10: WordPress.com  · Web view2017. 11. 3. · piece handle=01sike5r_1_1 tag=TAG20171103T045228 comment=API Version 2.0,MMS Version 3.17.7.27 channel ch1: backup set complete, elapsed

_OSB_WS_PURGE_LIMIT_OSB_WS_RECV_BUF_SIZE_OSB_WS_RESPONSE_TIMEOUT_OSB_WS_RETRY_WAIT_TIME_OSB_WS_REUSE_CONNECTION_OSB_WS_RUN_CLEANER_OSB_WS_SDU_SIZE_OSB_WS_SEND_BUF_SIZE_OSB_WS_SEND_TIMEOUT_OSB_WS_SESSION_RETENTION_TIME_OSB_WS_TDU_SIZE_OSB_WS_TRACE_LEVEL_OSB_WS_UNLOAD_DLL_OSB_WS_UPLOAD_DELAY_OSB_WS_USE_IPV6_OSB_WS_VALIDATE_CERT_OSB_WS_VALIDATE_CHUNK

bash-4.2$ rman target /Recovery Manager: Release 12.2.0.1.0 - Production on Fri Nov 3 04:52:23 2017Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.connected to target database: ORCL (DBID=1481236301)

RMAN> run { allocate channel ch1 type sbt; backup current controlfile; release channel ch1;}2> 3> 4> 5>

using target database control file instead of recovery catalogallocated channel: ch1channel ch1: SID=472 device type=SBT_TAPEchannel ch1: Oracle Secure Backup Web Services Library VER=3.17.7.27

Starting backup at 03-NOV-17channel ch1: starting full datafile backup setchannel ch1: specifying datafile(s) in backup setincluding current control file in backup setchannel ch1: starting piece 1 at 03-NOV-17channel ch1: finished piece 1 at 03-NOV-17piece handle=01sike5r_1_1 tag=TAG20171103T045228 comment=API Version 2.0,MMS Version 3.17.7.27channel ch1: backup set complete, elapsed time: 00:00:07Finished backup at 03-NOV-17

Starting Control File and SPFILE Autobackup at 03-NOV-17piece handle=c-1481236301-20171103-00 comment=API Version 2.0,MMS Version 3.17.7.27Finished Control File and SPFILE Autobackup at 03-NOV-17

Page 11: WordPress.com  · Web view2017. 11. 3. · piece handle=01sike5r_1_1 tag=TAG20171103T045228 comment=API Version 2.0,MMS Version 3.17.7.27 channel ch1: backup set complete, elapsed

released channel: ch1

RMAN> list backup summary;

List of Backups===============Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag------- -- -- - ----------- --------------- ------- ------- ---------- ---1 B F A SBT_TAPE 03-NOV-17 1 1 NO TAG20171103T0452282 B F A SBT_TAPE 03-NOV-17 1 1 NO TAG20171103T045238