Steps restore Oracle ASM on EC2 (AWS) from Snapshot backup or AMI image

Launch an instance from the AMI or create it from the snapshot in the same vpc. If you want to launch it in any other VPC or another account  or change the hostname, we would require to update the hostname in the as few additional steps as below.

Step1. Edit the Listener and TNS files to reflect the correct IP and host names:

/u01/app/oracle/product/12.1.0.2/grid/network/admin/listener.ora /u01/app/oracle/product/12.1.0.2/db_1/network/admin/tnsnames.ora 
/etc/hosts

Step2. Run the following command to update the installation:

sudo su – cd /u01/app/oracle/product/12.1.0.2/grid/crs/install 
perl roothas.sh -deconfig -force 
cd /u01/app/oracle/product/12.1.0.2/grid 
./root.sh 
cd /u01/app/oracle/product/12.1.0.2/grid/bin 
./srvctl add asm 
./srvctl add listener 
./srvctl start asm

Step3. As an Oracle user with ASM environment variables loaded, connect to asmcmd and mount the DATA and RECO disk groups.

ASMCMD>mount data
 
ASMCMD>mount reco
like0