Repository tools command to import SCM components
Use the scmImportComponent command to import the contents of an exported source-control management (SCM) component .tar file into a database.
The scmImportComponent command imports the contents of previously exported SCM components from a .tar file onto an existing server.
Any contributors in the tar file that don't previously exist in the target server must be imported while the application server is running using the importContributors flag. This flag imports only the contributor information. Connection information is required to communicate with the running server. Once the contributors exist in the server, then the remainder of the archive can be imported.
All data in the previously exported SCM component .tar file is imported together (except for links to change sets). Components being imported must not previously exist on the server.
- Imported components are initially owned by the default Admin user and are in an archived state.
An administrator must unarchive the component and set the owner to an appropriate process area or
contributor before users can access it.
An administrator can list archived components using the list components command:
scm list components -r local --visibility archived
(1167) "ImportedComponent Name"Components can be unarchived using the set attributes command:
scm set attribute --component 1167 --visibility private
The component property was set.
- Imported files and folders with permissions set to a context that does not exist on the server are reassigned to the Admin user. When you import components onto a new server, the permission context (that is, project area) might not exist.
- Custom attributes are controlled by the project area that owns the component. Custom attributes of the component that is imported to a new server are retained, but users cannot set new ones unless they are configured appropriately in the project area that owns the component.
In addition to the standard command-line arguments available to the repotools command, the following arguments are available.
|Path to the .tar file from which to import data.
|Path to the log file.
|repotools-application_scmImportComponent.log where application is usually ccm.
|Ignores component locks while performing a component import. Locks might exist if a previous import failed or was interrupted. Do not ignore locks when another component import operation is running.
|Ignores post-import verification errors and allows the import to finish despite errors.
|Specify whether to rebuild all, only SCM, or no database indexes. This might affect the performance of a currently running server. Valid values: none, scm, all.
|Whether or not to import change set links included in the TAR file. Imported links points back to the originating server.
|Import contributors from the TAR file into the running application server.
|Yes - if the tar contains contributors who don't exist in the server.
|The connection URL for the application server for importing contributors.
where application is usually "ccm"
|The administrator user Id to log into the application server when importing contributors.
|The administrator password to log into the application server when importing contributors.
|The file containing the administrator user's login credentials.
|The file containing the administrator user's login certificate
|The alias to log in with when using a smart card.
Open a command prompt and enter this command:
cd C:\Program Files\IBM\JazzTeamServer\server\ repotools-ccm.bat -scmImportComponent fromFile=exportComponents.tar importContributors repositoryURL=https://hostname.example.com:9443/ccm adminUserId=admin adminPassword=admin repotools-ccm.bat -scmImportComponent fromFile=exportComponents.tar
Open a command line and enter this command:
cd /opt/IBM/JazzTeamServer/server/ ./repotools-ccm.sh -scmImportComponent fromFile=exportComponents.tar importContributors repositoryURL=https://hostname.example.com:9443/ccm adminUserId=admin adminPassword=admin ./repotools-ccm.sh -scmImportComponent fromFile=./exportComponents.tar