Wednesday, April 6, 2022

EBS Cloud Backup Module

This article describes how to create a backup of On-Premises Oracle E-Business Suite instance on Oracle Cloud Infrastructure. 
After you have created the backup of the source environment, you subsequently complete the lift and shift by using Oracle E-Business Suite Cloud Manager Advanced Provisioning to provision an environment on Oracle Cloud Infrastructure from the backup

Overview : 

1. Download and Unzip EBS Cloud Backup Module Patch 33885255. Download to a server which has SSH connectivity to EBS Application and Database Tier Nodes, or download to either application or database server.

2. Setup API Signing Keys to login to OCI console from on-premise servers

3. Create a stage area directory on the source application tier. This directory will hold temporary files used during the application tier backup process as well as the application tier backup file in zip or tar format that is created locally before it is uploaded to Oracle Cloud Infrastructure Object Storage. Ensure that the application tier has free space equal to 30% of the size of the application tier file system or greater.

4. Create a stage area directory on the source database tier. This directory will hold the backup utilities and the temporary files used to process the backup. Ensure that it has at least 20 GB of free space.

5. OCI Object Storage must be reachable either directly from the source database server and primary application tier server or through a proxy server. ( ping cloud.oracle.com )

6. Run EBSCloudBackup.pl script. Since it takes long time depending on the internet speed, you should run the script in background session (like VNC)

Environment : 

Operating System : RHEL 6.6

EBS Application Version : 12.2.4

EBS Database Version : 12.1.0.2

Application Tier is a single node

DB Tier is two node RAC 

Step by Step Procedure :

1. Download and Unzip EBS Cloud Module Backup Patch - 33885255

I have downloaded to a non-prod application server which has SSH connectivity to EBS application and database servers

[applmgr@ebsapp RemoteClone]$ pwd
/ebsr12/CLOUD_BKP_MOD/patch/33885255/RemoteClone
[applmgr@ebsapp RemoteClone]$ ls
3pt  cln.props    EBSCloudBackup.pl  flows         lib   ODBSOSSModule  Utils       validations
bin  ebsclone.pl  EBS-METADATA       FTMOSSModule  logs  session        Validation
[applmgr@ebsapp RemoteClone]$e

2. Setup API Signing Keys

Why it is required ? To establish an authentication mechanism between on-premise servers and Oracle cloud account that has privileges to access object storage.

=> Login to your on-premise server where backup module patch is unzipped

=> Create directory to store keys

[applmgr@ebsapp .oci]$ pwd
/home/applmgr/oci_lift_shift/.oci
[applmgr@ebsapp .oci]$

=> Generate Public and Private Key Pair

Create Private Key :

[applmgr@ebsapp oci_lift_shift]$ openssl genrsa -out /home/applmgr/oci_lift_shift/.oci/oci_api_key.pem 2048
Generating RSA private key, 2048 bit long modulus
............................................................+++.......+++
e is 65537 (0x10001)
[applmgr@ebsapp oci_lift_shift]$ ls -ltr /home/applmgr/oci_lift_shift/.oci/oci_api_key.pem
-rw-r--r-- 1 applmgr oinstall 1675 Mar 11 15:37 /home/applmgr/oci_lift_shift/.oci/oci_api_key.pem
[applmgr@ebsapp oci_lift_shift]$

Change Private Key File Permissions : 

[applmgr@ebsapp oci_lift_shift]$ chmod go-rwx /home/applmgr/oci_lift_shift/.oci/oci_api_key.pem
[applmgr@ebsapp oci_lift_shift]$ ls -ltr /home/applmgr/oci_lift_shift/.oci/oci_api_key.pem
-rw------- 1 applmgr oinstall 1675 Mar 11 15:37 /home/applmgr/oci_lift_shift/.oci/oci_api_key.pem
[applmgr@ebsapp oci_lift_shift]$

Create Public Key Using Previously Created Private Key

[applmgr@ebsapp oci_lift_shift]$ openssl rsa -pubout -in /home/applmgr/oci_lift_shift/.oci/oci_api_key.pem -out /home/applmgr/oci_lift_shift/.oci/oci_api_key_public.pem
writing RSA key
[applmgr@ebsapp oci_lift_shift]$

Get the Key Finger Print

[applmgr@ebsapp oci_lift_shift]$ openssl rsa -pubout -outform DER -in /home/applmgr/oci_lift_shift/.oci/oci_api_key.pem | openssl md5 -c
writing RSA key
(stdin)= a4:s1:d3:3f:a4:s0:d4:f5:30:91:42:a9:s9:d2:28:f1
[applmgr@ebsapp oci_lift_shift]$

Copy the keys to on-prem EBS application and database servers

scp -pr /home/applmgr/oci_lift_shift applprod@ebsprodapp:/home/applprod/
scp -pr /home/applmgr/oci_lift_shift oraprod@ebsproddb:/home/oraprod/

Add the Public Key in OCI Console

Last step is to add the public key - oci_api_key_public.pem in OCI console and verify the finger print, it should match with the one shown in above command.

Login to the OCI console with a user that has privileges to create object storage bucket. I am assigned to administrators group which has complete access.


Navigate to Profile => My Profile





Click on API Keys => Add API Key




Select Paste Public Key and cat the public key generated previously - oci_api_key_public.pem and paste the content in this box.















Click on Add

Verify the Keys Finger Print. It should match the finger print shown in above command


Note down the OCID's of below OCI resources, this will be required by Cloud Backup Module to identify in which compartment object storage bucket should be created.

Tenancy OCID : ocid1.tenancy.oc1..###########################################

User OCID : ocid1.user.oc1..###########################################

Compartment OCID : ocid1.compartment.oc1..###########################################

To Get Tenancy OCID navigate to Profile => Tenancy





To get User OCID, navigate to Profile => My Profile



To get Compartment OCID, navigate to Menu => Identity & Security => Compartments => Click on your compartment where you want create object storage bucket.





 

3. Create Stage Area on Application Server

Ensure that stage area has free space equal to 30% of the size of the application tier file system or greater.

[applprod@ebsprodapp CLOUD_BKP_MOD]$ pwd
/appbin/CLOUD_BKP_MOD
[applprod@ebsprodapp CLOUD_BKP_MOD]$ ls -ltr
total 4
drwxrwxrwx 3 applprod oinstall 4096 Apr  3 11:42 stage_APP
[applprod@ebsprodapp CLOUD_BKP_MOD]$ df -h .
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdc5       280G  173G   93G  66% /appbin
[applprod@ebsprodapp CLOUD_BKP_MOD]$


4. Create Stage Area on Database Server

Ensure that it has at least 20 GB of free space.

[oraprod@ebsproddb CLOUD_BKP_MOD]$ pwd
/backup/CLOUD_BKP_MOD
[oraprod@ebsproddb CLOUD_BKP_MOD]$ ls -ltr
total 4
drwxrwxrwx 3 oraprod oinstall 4096 Apr  3 11:44 stage_DB
[oraprod@ebsproddb CLOUD_BKP_MOD]$ df -h .
Filesystem          Size  Used Avail Use% Mounted on
/dev/mapper/mpathq  394G  191G  183G  52% /backup
[oraprod@ebsproddb CLOUD_BKP_MOD]$


5. Run EBSCloudBackup.pl

Navigate to RemoteClone directory inside patch and run below command

[applmgr@ebsapp RemoteClone]$ pwd
/applmgr/CLOUD_BKP_MOD/patch/33885255/RemoteClone
[applmgr@ebsapp RemoteClone]$

[applmgr@ebsapp RemoteClone]$ 3pt/perl/bin/perl EBSCloudBackup.pl



                                        ==============================================
                                        Migrate Oracle E-Business Suite - Options
                                        ==============================================


                        Migrate Oracle E-Business Suite - Enter Selection:
                        1:   Create E-Business Suite Backup and Upload to Oracle Cloud Infrastructure
                        2:   Exit

                        Enter your choice from above list:  1



                                        ===========================================
                                        Enter Source Database Tier - Proxy Details
                                        ===========================================

                        [Ctrl-B: Back, Ctrl-H: Main Menu]

                        1: Yes
                        2: No

                        Enter your choice from above list: 2



                                        =====================================================================
                                        Migrate Oracle E-Business Suite - Enter Source Database Tier Details
                                        =====================================================================

                        [Ctrl-B: Back, Ctrl-H: Main Menu]

                        Enter Fully Qualified Hostname                              : ebsproddb.oracle.com
                        OS User Name                                                : oraprod
                        OS User Password [skip if not applicable]                   : ******

                        Context File                                                : /oraprod/DB/orahome/12.1.0/appsutil/EBSPROD_ebsproddb.xml
                        OS Time Zone                                                : Asia/Dubai

                        Database Transparent Data Encrypted ( TDE ): ( Yes | No )   : No


                        Validating the details...
                        Stage Directory                                             : /backup/CLOUD_BKP_MOD/stage_DB



                                        ============================================
                                        Enter Source Application Tier Proxy Details
                                        ============================================

                        [Ctrl-B: Back, Ctrl-H: Main Menu]

                        1: Yes
                        2: No

                        Enter your choice from above list: 2



                                        ========================================================================
                                        Migrate Oracle E-Business Suite - Enter Source Application Tier Details
                                        ========================================================================

                        [Ctrl-B: Back, Ctrl-H: Main Menu]

                        Enter Fully Qualified Hostname                              : ebsprodapp.oracle.com
                        OS User Name                                                : applprod
                        OS User Password [skip if not applicable]                   : *******

                        Context File                                                : /applprod/APP/EBSPROD/fs1/inst/apps/EBSPROD_ebsprodapp/appl/admin/EBSPROD_ebsprodapp.xml
                        APPS Password                                               : **********



                        Validating the details...
                        Stage Directory                                             : /appbin/CLOUD_BKP_MOD/stage_APP

                        WebLogic Server Admin Password                              : ***********



                                        ===========================
                                        Enter OSS - Backup Details
                                        ===========================

                        [Ctrl-B: Back, Ctrl-H: Main Menu]

                        Backup Identifier Tag                                       : EBSPRODBKP
                        Backup Thread Count                                         : 8
                        Backup Archive Type ( tar | tgz )                           : tgz
                        Advanced Configuration Parameter File Path                  :
                        Backup Encryption Password                                  : *********


                        Confirm Backup Encryption Password                          :

                        Invalid encryption password. Try again.
                        Backup Encryption Password                                  : *********


                        Confirm Backup Encryption Password                          : *********



                                        ================================================
                                        Enter Oracle Cloud Infrastructure Proxy Details
                                        ================================================

                        [Ctrl-B: Back, Ctrl-H: Main Menu]

                        1: Yes
                        2: No

                        Enter your choice from above list:



                                        ===========================
                                        Enter OSS - Backup Details
                                        ===========================

                        [Ctrl-B: Back, Ctrl-H: Main Menu]

                        Backup Identifier Tag [EBSPRODBKP]                            :
                        Backup Thread Count [8]                                     :
                        Backup Archive Type ( tar | tgz )                           : tgz
                        Advanced Configuration Parameter File Path                  :
                        Backup Encryption Password                                  : *********


                        Confirm Backup Encryption Password                          : *********



                                        ================================================
                                        Enter Oracle Cloud Infrastructure Proxy Details
                                        ================================================

                        [Ctrl-B: Back, Ctrl-H: Main Menu]

                        1: Yes
                        2: No

                        Enter your choice from above list: 2



                                        ============================================================================
                                        Migrate Oracle E-Business Suite - Enter Oracle Cloud Infrastructure Details
                                        ============================================================================

                        [Ctrl-B: Back, Ctrl-H: Main Menu]

                        Oracle Cloud User OCID                                      : ocid1.user.oc1..##########
                        Oracle Cloud Fingerprint                                    : ##########
                        Oracle Cloud User Private Key Path On Database Tier         : /home/oraprod/oci_lift_shift/.oci/oci_api_key.pem
                        Oracle Cloud User Private Key Path On APPS Tier             : /home/applprod/oci_lift_shift/.oci/oci_api_key.pem
                        Oracle Cloud Tenancy OCID                                   : ocid1.tenancy.oc1..##########
                        Oracle Cloud Region                                         : me-dubai-1
                        Oracle Cloud Tenant Name                                    : ##########
                        Oracle Cloud Compartment OCID                               : ocid1.compartment.oc1..##########

                        Target Database Type - ( Compute | VM DB System | Exadata Cloud Service ): VM DB System



                                        =========================================
                                        Migrate Oracle E-Business Suite - Review
                                        =========================================

                        [Ctrl-B: Back, Ctrl-H: Main Menu]




                        Mode                           : BMCS_CDB


                        Source Database Details:

                        Host Name                      : ebsproddb.oracle.com
                        OS User Name                   : oraprod
                        Stage Directory                : /backup/CLOUD_BKP_MOD/stage_DB
                        Context File                   : /oraprod/DB/orahome/12.1.0/appsutil/EBSPROD_ebsproddb.xml
                        OS Time Zone                   : Asia/Dubai


                        Source Application Tier Details:

                        Hostname                        : ebsprodapp.oracle.com
                        OS User Name                    : applmgr
                        Stage Directory                 : /appbin/CLOUD_BKP_MOD/stage_APP
                        Context File                    : /appbin/APP/EBSPROD/fs1/inst/apps/EBSPROD_ebsprodapp/appl/admin/EBSPROD_ebsprodapp.xml


                        OSS - Backup Details:

                        Backup Identifier Tag                        : EBSPRODBKP
                        Backup Thread Count                          : 8
                        Backup Archive Type                          : tgz


                        Oracle Cloud Infrastructure Details:

                        Oracle Cloud User OCID                        : ocid1.user.oc1..##########
                        Oracle Cloud Fingerprint                      : ##########
                        Oracle Cloud Tenancy OCID                     : ocid1.tenancy.oc1..##########
                        Oracle Cloud Region                           : me-dubai-1
                        Oracle Cloud Tenant Name                      : ##########
                        Oracle Cloud Compartment OCID                 : ocid1.compartment.oc1..##########
                        Target Database Type                   : VM DB System



                                        =============================
                                        Proceed With Selected Action
                                        =============================

                        [Ctrl-B: Back, Ctrl-H: Main Menu]

                        1: Yes
                        2: No

                        Enter your choice from above list: 1


.
.
.
.
.


On host ebsprodapp.oracle.com Application Tier Upload task ran successfully. Time taken 01:23:41.39
On host ebsproddb.oracle.com Database Tier Upload task ran successfully. Time taken 05:38:14.30
Total time taken 05:38:17.43


                        Exiting EBS Migrate Tool...


[applmgr@ebsapp RemoteClone]$


It will create object storage bucket in the mentioned compartment.





Issues Faced : 

1. ERROR: ETCC does not exist under /oraprod/DB/orahome/12.1.0/appsutil/etcc.

Fix : Download patch 17537119 from My Oracle Support, unzip it under /oraprod/DB/orahome/12.1.0/appsutil/etcc and run /oraprod/DB/orahome/12.1.0/appsutil/etcc/checkDBpatch.sh to avoid ADOP related issues.

Pre-requisite : DB and APP should be ETCC compliant

2. [2022/03/14 17:48:33] [DBTIEREBSVALIDATION] ERROR:There are java permission issues on the database.

Fix : Run below commands as sys user, can be run when application is up.

Please run the following command on the database to fix the issues
exec  dbms_java.grant_policy_permission('JAVA_ADMIN','SYS','javax.management.MBeanServerPermission','*');
exec  dbms_java.grant_policy_permission('JAVA_ADMIN','SYS','javax.management.MBeanPermission','*');
[2022/03/14 17:48:33] [DBTIEREBSVALIDATION] ERROR: Source database tier post-validation failed.
[2022/03/14 17:48:33] [DBTIEREBSVALIDATION] Updating taskid dbTierEBSValidation status to Failed


SQL> exec  dbms_java.grant_policy_permission('JAVA_ADMIN','SYS','javax.management.MBeanServerPermission','*');

PL/SQL procedure successfully completed.

SQL> exec  dbms_java.grant_policy_permission('JAVA_ADMIN','SYS','javax.management.MBeanPermission','*');

PL/SQL procedure successfully completed.

SQL> exit






No comments:

Post a Comment