clone_as_home
Clones the specified Application Server Oracle Home or S/W Library component from the target host to specified destinations. For a Portal and Wireless installation, the OID user and password are also needed. For a J2EE instance connected to only a DB-based repository, a DCM Schema password is needed.
Passing Variables Through EM CLI
When working with variables such as %perlbin% or %oracle_home%, EM CLI passes variable values from the current local environment instead of the variables themselves. To pass variables through an EM CLI command, as might be the case when using the -prescripts or -postscripts options, you can place the EM CLI command in a batch file and replace all occurrences of % with %%.
Format
emcli clone_as_home
-input_file="dest_properties:file_path"
-list_exclude_files="list of files to exclude"
-isSwLib="true/false"
-tryftp_copy="true/false"
-jobname="name of cloning job"
-iasInstance=instance
-isIas1013="true/false"
[-oldIASAdminPassword=oldpass]
[-newIASAdminPassword=newpass]
[-oldoc4jpassword=oldpass]
[-oc4jpassword=newpass]
[-oiduser=oid admin user]
[-oidpassword=oid admin password]
[-dcmpassword=dcm schema password]
[-prescripts="script name to execute"]
[-run_prescripts_as_root="true/false"]
[-postscripts="script to execute"]
[-run_postscripts_as_root="true/false"]
[-rootscripts="script name to execute"]
[-swlib_component ="path:path to component;version:rev"]
[-source_params="TargetName:name;HomeLoc:loc;HomeName:name;
ScratchLoc:Scratch dir Location"
[-jobdesc="description"]
[ ] indicates that the parameter is optionalOptions
-
input_file="dest_properties:file_path"
File containing information regarding the targets.
Each line in the file corresponds to information regarding one destination.
Format:
Destination Host Name1;Destination Home Loc; Home Name; Scratch Location;For more information about the input_file option, see -input_file Syntax Guidelines.
-
list_exclude_files
Comma-separated list of files to exclude. Not required if the source is software lib. "*" can be used as a wild card.
-
isSwLib
Specifies whether it is an Oracle Home database or Software Library.
-
ryftp_copy
Try FTP to copy or not. You should set the FTP copy option to false when using EM CLI from the command line.
-
jobname
Name of the cloning job.
-
iasInstance
Name of instance.
-
isIas1013
Specifies whether this is a 10.2.3 Ias home.
-
oldoc4jpassword
Old OC4j password. (Required for 10.1.3 Ias homes.)
-
oc4jpassword
New OC4J password. (Required for 10.1.3Ias homes.)
-
oldIASAdminPassword
Old Application Server administrator password. (Not required for 10.1.3 Ias homes.)
-
newIASAdminPassword
New Application Server administrator password. (Not required for 10.1.3 Ias homes.)
-
oiduser
OID admin user.
-
oidpassword
OID admin password.
-
dcmpassword
DCM schema password.
-
prescripts
Path of script to execute.
Note:
Double-quoted options can be passed using an escape (\) sequence. For example:
prescripts=" <some value here>=\"some value here\" "
-
run_prescripts_as_root
Run prescripts as "root". By default, the option is set to false.
-
postscripts
Path of script to execute.
-
run_postscripts_as_root
Run postscripts as "root". By default, the option is set to false.
-
rootscripts
Path of the script to execute. The job system environment variables (
%oracle_home%,%perl_bin%) can be used for specifying script locations. -
swlib_component
Path to the Software Library to be cloned. "isSwLib" must be true in this case.
-
source_params
Source Oracle home information. "isSwLib" must be false in this case.
-
jobdesc
Description of the job. If not specified, a default description is generated automatically.
Example
emcli clone_as_home
-input_file="dest_properties:/home/destinations.txt"
-list_exclude_files="centralagents.lst"
-isSwLib="false"
-tryftp_copy="false"
-jobname="clone as home"
-iasInstance="asinstancename"
-isIas1013="false"
-oldIASAdminPassword="oldpassword"
-newIASAdminPassword="newpassword"
-prescripts="/home/abc/myscripts"
-run_prescripts_as_root="true"
-rootscripts="%oracle_home%/root.sh"
-source_params="TargetName:host.example.com;HomeLoc=/home/oracle/appserver1;
HomeName=oracleAppServer1;ScratchLoc=/tmp"