According to the Oracle Database Upgrade Guide, the traditional clone.pl script has been officially deprecated. The modern standard for cloning Oracle software involves using the -createGoldImage flag within the installer and then deploying that image to the target location.
In this scenario, we are creating a gold image from an existing 19c Database Home and preparing it for a new destination.
Environment Details:
/u01/app/oracle/product/19.0.0/dbhome_1/u01/app/oracle/product/19.0.0/dbhome_2First, ensure the target directory exists and is empty. Then, run the runInstaller with the -createGoldImage flag.
[oracle@ol7-19-rac1 ~]$ ls -l /u01/app/oracle/product/19.0.0/dbhome_2/ total 0 [oracle@ol7-19-rac1 ~]$ $ORACLE_HOME/runInstaller -createGoldImage -destinationLocation /u01/app/oracle/product/19.0.0/dbhome_2 -silent Launching Oracle Database Setup Wizard... [oracle@ol7-19-rac1 ~]$ ls -l /u01/app/oracle/product/19.0.0/dbhome_2/ total 3069584 -rw-r--r--. 1 oracle oinstall 3143250100 Oct 29 13:09 db_home_2019-10-29_12-59-52PM.zip
Once the .zip file is created, navigate to the target directory and unzip the contents to complete the software deployment phase.
[oracle@ol7-19-rac1 dbhome_2]$ unzip -qo db_home_2019-10-29_12-59-52PM.zip [oracle@ol7-19-rac1 dbhome_2]$ ls -ld * drwxr-xr-x. 2 oracle oinstall 102 Oct 2 00:06 addnode drwxr-xr-x. 3 oracle oinstall 20 Oct 2 00:35 admin ... -rwxr-x---. 1 oracle oinstall 1783 Mar 8 2017 runInstaller
Cloning a Grid Infrastructure home follows a similar logic but utilizes the gridSetup.sh script.
Environment Details:
/u01/app/19.0.0/grid/u01/app/19.0.0/grid5Before generating the image, create the target directory and ensure permissions are correctly set for the oracle user.
[root@ol7-19-rac1 ~]# mkdir -p /u01/app/19.0.0/grid5 [root@ol7-19-rac1 ~]# chmod 775 /u01/app/19.0.0/grid5 [root@ol7-19-rac1 ~]# chown oracle:oinstall /u01/app/19.0.0/grid5
Run the gridSetup.sh script from the source home. Note that you may need to adjust permissions on specific log directories (like ol7-19-rac1 or procwatcher) if the installer encounters access issues during the image creation.
[oracle@ol7-19-rac1 ~]$ echo $ORACLE_HOME /u01/app/19.0.0/grid [oracle@ol7-19-rac1 ~]$ $ORACLE_HOME/gridSetup.sh -creategoldimage -destinationlocation /u01/app/19.0.0/grid5 -silent Launching Oracle Grid Infrastructure Setup Wizard... Successfully Setup Software. Gold Image location: /u01/app/19.0.0/grid5/grid_home_2019-10-29_04-36-47PM.zip
Using createGoldImage is now the mandatory replacement for the deprecated clone.pl. This method encapsulates the current state of the Oracle Home—including patches and configurations—into a single distributable archive, making mass deployments much more consistent.
Ready to optimize your Oracle Database for the future?