clone_crs_home
Creates an Oracle Clusterware cluster given a source Clusterware home location or a Clusterware S/W Library component for specified destination nodes.
Format
emcli clone_crs_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"
       -home_name="name of home to use when creating Oracle Clusterware cluster"
       -home_location="location of home when creating Oracle Clusterware cluster"
       -clustername=name of cluster to create
       [-isWindows="false/true"]
       [-ocrLoc=ocr location]
       [-vdiskLoc=voting disk location]
       [-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 Name;Destination Node Name;Scratch Location;PVTIC;VirtualIP;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. An asterisk "*" can be used as a wildcard. 
- 
                        isSwLib Specifies whether it is an Oracle Home database or Software Library. 
- 
                        tryftp_copy Try FTP to copy or not. You should set the FTP copy option to false when using emclifrom the command line.
- 
                        jobname Name of the cloning job. 
- 
                        home_name Name of the home to use for all homes in the Oracle Clusterware cluster. 
- 
                        home_location Location of the home to use for all homes in the Oracle Clusterware cluster. 
- 
                        clustername Name of the cluster to create. 
- 
                        isWindows Specify whether the cloning source is on a Windows Platform. This option only applies for creating CRS cloning from a Gold Image source. The default value is false. 
- 
                        ocrLoc Oracle Cluster Registry Loaction. 
- 
                        vdiskLoc Voting disk location. 
- 
                        prescripts Path of the 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, this option is set to false. 
- 
                        postscripts Path of the script to execute. 
- 
                        run_postscripts_as_root Run postscripts as "root". By default, it is false. 
- 
                        rootscripts Path of the script to execute. 
- 
                        swlib_component Path to the Software Library to be cloned. "isSwLib" must be true in this case. 
- 
                        source_params Source Oracle home info. "isSwLib" must be false in this case. 
- 
                        jobdesc Description of the job. If not specified, a default description is generated automatically. 
Example
emcli clone_crs_home -input_file="dest_properties:crs.prop" -isSwLib="true" -tryftp_copy="true" -jobname="crs cloning job2" -home_name="cloneCRS1" -home_location="/scratch/scott/cloneCRS1 " -clustername="crscluster" -ocrLoc="/scratch/shared/ocr" -vdiskLoc="/scratch/shared/vdisk" -postscripts="%perlbin%/perl%emd_root%/admin/scripts/cloning/samples/ post_crs_ create.pl ORACLE_HOME=%oracle_home%" -run_postscripts_as_root="true" -rootscripts="%oracle_home%/root.sh" -swlib_component="path:Components/crscomp;version:.1"
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 %%.