Import examples

We will continue the previous example and import the contents of the same XML file (myImportData.xml).

Example 1: Full import

The following command will attempt to import all the Application Deployment information in the myImportData.xml file using the default (skip) conflict resolution strategy:

/opt/opsware/da/bin/admtool.sh -i --importFile /tmp/myImportData.xml

We expect that MyAppA will be skipped, because it already exists, and the other applications (MyAppB, MyAppC, and MyAppD) will be created. The following messages confirm this:

After the import operation, all four applications are listed in the Manage Applications dialog:

Note the following:

If you attempt to import data from a file that contains invalid XML, the import will not be performed.

If you import a Software Policy, Package, or Application Configuration component, and the pertinent library items are missing, a message like this one appears:

Not Found:Package'OPSWpytwist2-40.0.0.7.325.zip(SunOS 5.8)'does not exist

If this happens, you will not be able to create a version until you select a different library item—or add the missing item to the library on this core, and then select that item.

To perform this import using the overwrite conflict resolution strategy, use this command:

/opt/opsware/da/bin/admtool.sh -i --importFile /tmp/myImportData.xml --importConflict overwrite

In this case, the following messages appear on stdout:

Example 2: Partial import

Assuming that only MyAppA exists, the following command imports only MyAppB from the myImportData.xml file:

/opt/opsware/da/bin/admtool.sh -i --importAppList "MyAppA;MyAppB" --importFile /tmp/myImportData.xml

We expect the following results:

MyAppA will be skipped, because it already exists on this SA core.

MyAppB will be created.

MyAppC and MyAppD will not be created, because they are not part of the --importAppList argument.

The following messages confirm this result:

To perform this import using the overwrite conflict resolution strategy, use this command:

/opt/opsware/da/bin/admtool.sh -i --importAppList "MyAppA;MyAppB" --importFile /tmp/myImportData.xml --importConflict overwrite

In this case, the following messages appear on stdout: