Using the Import Script

Code Insight 6.14.2

The Import script can be run from any machine that can execute ScriptRunner (Core Server, Scan Server, Detector, client). Use the -server flag to set the value of the Core Server. In a clustered environment, you must also set
-scan_server to the Scan Server containing the workspace you just scanned.

Custom data (user-created licenses, components, and component versions) can be imported along with a workspace that uses that custom data, or the custom data can be imported by itself. For more information, see What is Custom Data?

To use the import script, do the following:

1. Create a new workspace on the Core Server onto which you want to perform the import. This will be the 'target workspace' that will accept the audit data. This workspace must contain all the files that were present in the exported workspace.

Note:In a clustered environment, both the Core Server and the target Scan Server must be designated (-server and -scan_server flags).

2. Execute a scan of the workspace files. Data that is not created by this scan will be copied over during import.
3. Open the XML file containing the workspace data to be imported. If the file paths in the XML file do not match the file paths in the workspace you just scanned, the file information from the XML file will not be imported. You can do either one of the following:
Note that values needed for the -adv_file_comparison and -adv_file_comparison_depth import flags.
Edit the export XML file to change the file paths to exactly match the file locations in the target workspace.
4. Run the import script. The following are descriptions of available flags and examples:
Required options for importing a workspace:

-input (-f)

Indicates the XML file that contains the workspace information to be imported.

-workspace (-w)

Import data into the workspace with this name.

If the XML file containing the workspace information references custom data (that is, user-created licenses, components, or component versions), also indicate which XML file contains that custom data using the
-custom_data_file (-x) flag.
5. Open Detector for the target workspace and verify that the audit information was imported correctly.