import_jobs

Imports all job definitions into Enterprise Manager, including Corrective Actions from a zip file. Library jobs are created. The EM CLI logged-in user is set as the library job owner.

Format

emcli import_jobs 
   -import_file=<zip_file_name>"
   [-name="job name1;job_name2;..."]
   [-type="job type1;job_type2;..."]
   [-targets="tname1:ttype1;tname2:ttype2;..."]   [-owner="owner1;owner2;..."]
   [-preview]   [-force]   [-stoponerror]

[ ]  indicates that the parameter is optional

Options

  • import_file

    Zip file name that contains job definitions.

  • name

    Job name to be used for filtering. Semicolon-separated job names can be provided. Filtering by using a wildcard character is not supported.

  • type

    Job type to be used for filtering. Semicolon-separated job types can be provided. Filtering by using a wildcard character is not supported.

  • targets

    Target name and target type to be used for filtering. Semicolon-separated target names and types can be provided. Filtering by using a wildcard character is not supported.

  • owner

    Job owner to be used for filtering. Semicolon-separated owners can be provided. Filtering by using a wildcard character is not supported.

  • preview

    Prints the job definitions in the zip file. Filter values provided are used to show only matching job definitions. Jobs are not created in Enterprise Manager.

  • force

    Updates the job record if it already exists. Otherwise, the job record is created. When this option is not specified, the default behavior of the system is to always create jobs from the import file.

  • stoponerror

    Stops the import operation is after the first failure of the job import and rolls back the transaction. All jobs created by using this EM CLI session are deleted.

Output Columns

Success/Error messages.

Examples

Example 1

This example imports all job definitions into Enterprise Manager. If the job already exists, the details are edited. Otherwise, a new job is created.

emcli import_jobs  -import_file=job data.zip -force

Example 2

This example imports all job definitions into Enterprise Manager, and on the first failure, rolls back the jobs created in this session. The remaining jobs from the import file are not processed. Otherwise, a new job is created.

emcli import_jobs  -import_file=job data.zip -stoponerror