Showing posts with label Oracle Cloud. Show all posts
Showing posts with label Oracle Cloud. Show all posts

Oracle Database Cloud Backup

Oracle Database Backup Service -- securely backup your database using RMAN interface for seamless backup and restore operations.


Step 1: Create a container in Oracle Cloud to save the backup.


Step 2: Install Oracle Cloud Backup Module 



[orauser@test opc_wallet]$ ls
cwallet.sso  cwallet.sso.lck

[orauser@test dbs]$ cat opcDEV.ora
OPC_HOST=https://storage_container_url
OPC_WALLET='LOCATION=file:/u01/orauser/dbtest/dbhome/dbs/opc_wallet CREDENTIAL_ALIAS=alias_opc'

Step 3: RMAN Configuration and backup

RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt PARMS='SBT_LIBRARY=/u01/orauser/dbtest/dbhome/lib/libopc.so, SBT_PARMS=(OPC_PFILE=/u01/orauser/dbtest/dbhome/dbs/opcDEV.ora)';
RMAN> SET ENCRYPTION ON IDENTIFIED BY '<Password>' ONLY;
RMAN> CONFIGURE COMPRESSION ALGORITHM 'MEDIUM';
RMAN> CONFIGURE DEVICE TYPE sbt BACKUP TYPE TO COMPRESSED BACKUPSET;
RMAN> CONFIGURE DEFAULT DEVICE TYPE TO 'sbt_tape';

$ rman target /
RMAN>  backup database plus archivelog;

Verify the backups are created in container.


Step 4: Using backup for restore operation.
Using the backup created in Oracle cloud, we can use it to restore/recovery during any failure of on-premises database and can also be used to create the database in Oracle cloud i.e. we can migrate Oracle Database from On-Premises to Oracle Cloud.

RMAN> SET DECRYPTION IDENTIFIED BY '<Password>';
RMAN> SET DBID=<Database_ID>;
RUN {
ALLOCATE CHANNEL t1 DEVICE TYPE sbt PARMS='SBT_LIBRARY=/u01/orauser/dbtest/dbhome/lib/libopc.so, SBT_PARMS=(OPC_PFILE=/u01/orauser/dbtest/dbhome/dbs/opcDEV.ora)';
RESTORE ...;
}

Creating Database service using cloud backup.


Create Oracle Database Service in Oracle Cloud


Process Flow:



 Step1: Create SSH key
Note: 
We can provide Passphrase to enhance security. 
To save public key use copy & paste, save it as .pub file.


Step2: Create the Database Cloud Service

Note: In Advanced setting, we can define the port and timestamp for the database.


Step 3: Apply security rules to access the cloud the service (Database).




Step 4: Use dbaas_monitor