CentraSite 10.7 | CentraSite User’s Guide | Exporting and Importing Registry Objects | Exporting and Importing Registry Objects through Command Line | Importing Objects from an Archive Through the Command Line
 
Importing Objects from an Archive Through the Command Line
Pre-requisites:
To import objects through the CentraSite Command Line Interface, you must have the CentraSite Administrator role.
You can import registry objects from an archive into the CentraSite registry.
CentraSite provides a command tool named ImportArchive for this purpose.
*Run the command tool ImportArchive.
The syntax is of the format: C:\SoftwareAG\CentraSite\utilities>ImportArchive.cmd <CentraSite URL> <archive filename> <username> <password> [-help] [-setreplace] [-keepowner] [-setowner name] [-keeporganization] [-keeplcmstate] [-removemissingreferences] [-importgroup] [-executewsdlpolicy] [-importorg id] [-importorgname name] [-ignoreauthtokens] [-simulate] [-importkeys id[,id...] [-sequential [-minimizeaudits] [-listonly] [-skip cnt]]
The input parameters and options are:
Parameter
Description
CentraSite-URL
(Optional). The URL of the CentraSite registry/repository. For example, http://localhost:53307/CentraSite/CentraSite
archive-filename
The name of the exported archive (Zip) file. The archive file can contain an organization with its assets or can contain a set of objects that were exported from one or more organizations.
username
The user ID of a registered CentraSite user who has the CentraSite Administrator role. For example, Administrator.
password
The password for the CentraSite user identified by the parameter username.
-help
(Optional). Display the full description of ImportArchive command (with detailed parameters and options description).
-executewsdlpolicy
(Optional). Execute the WSDL Regeneration policy for service import. By default, the command execution ignores the policy.
-ignoretypeversion
(Optional). Ignore the version check on asset types.
-importgroup
(Optional). Import the groups that include a single user.
-importkeys id[,id...]
(Optional). Import only those objects which have keys specified.
-importorg id
(Optional). Import the objects into the organization specified by the UUID.
-importorgname name
(Optional). Import the objects into the organization specified by the name.
-keeplcmstate
(Optional). Keep the LCM state of the object which is set at export.
-keepowner
(Optional). Keep the object owner instead of assigning the importing user.
-keeporganization
(Optional). Keep the organization of the imported objects instead of assigning the active one performing the message logging.
-listonly
(Optional). Print only the list of objects to be imported. The -listonly option can be used to adjust the -skip option. No updates will be performed with the -sequential option.
-minimizeaudits
(Optional). Import only first and last audit record for each object, along with the -sequential option.
-removemissingreferences
(Optional). Remove all missing associations that could cause dangling references.
-setowner name
(Optional). All the imported objects will be set to a specified user.
-setreplace
(Optional). Replace objects if already present in the target registry.
-simulate
(Optional). Simulate the import, however, do not updates the objects in the target registry.
-sequential
(Optional). Imports the objects sequentially in a reasonable order.
-skip cnt
(Optional). Skip records before importing, along with the -sequential option.
-ignoreauthtokens
(Optional). Ignore API keys and OAuth2 tokens of the imported assets.
Example (all in one line):
The command for importing an archive into CentraSite running on host myhost, and force a replacement of all assets from archive in the CentraSite registry, with an administrator account INTERNAL\Admin and password AdminPW would be:
C:\SoftwareAG\CentraSite\utilities>ImportArchive.cmd -setreplace http://myhost:53307/CentraSite/CentraSite c:/tmp/export.zip INTERNAL\Admin AdminPW