importRepository
imports the contents of a data file generated by exportRepository, into a standard or versioned repository. importRepository
is especially useful for importing large numbers of items.
Note: When running importRepository
on a third-party application server, you must configure the server to use an ATG data source and transaction manager, not your native application server’s data source and transaction manager.
Syntax
You run importRepository
from <ATG9dir>/home/bin
as follows:
importRepository [–m
startup-module
]...
[-s
server-name
] –file
source
-file
{
project-spec
|
workspace-spec
}
[optional-arguments
]
For example:
importRepository –m CatalogVer –file /users/joe/CatalogExport.jar
–project MyFirstProject
Importing to a project or workspace
If importing to a versioned repository, you must specify either a project or a workspace as follows:
-project
name
[-workflow
name
]
-noDeleteAll –username
name
-workspace
name
[-nocheckin] [-noDeleteAll]
Note: After deployment targets are initialized, use –project
with importRepository
instead of -workspace
. When –project
is used, assets are imported into a new project with the default or specified workflow. Users can then access this project and perform the tasks associated with its workflow.
Command-line help
To obtain command-line help on syntax usage, type:
importRepository -help
Versioning Arguments
The following options used to import repository data to a versioned repository. In order to use them, the Publishing module must be running.
Argument | Description |
---|---|
| Specifies the name of the project to create for the import operation. This option is available only if the Publishing module is running. You must qualify this option with After running If qualified by
|
| Specifies the workspace to use during the import operation, where The workspace is the area in the VersionManager where the import takes place. If the specified workspace does not exist, the system creates it. If qualified by If qualified by You must specify this option or |
| Comment to use when checking in imported data. The default is |
| Username to use when checking in imported data. The default is This argument is required when the |
| Component path of VersionManager to use for versioned imports. Use this argument only if the VersionManager runs in a non-standard location. |
General Arguments
Argument | Description |
---|---|
| Lists the modules to start for the export process. Specify the modules that contain the source repositories for exported data. To start multiple modules, you can supply multiple This argument must precede all others, including |
| The ATG instance on which to run this script. Use this argument when you have multiple servers running on your machine. This argument must precede all others except |
| Required, specifies the file with the data to import. The path that you specify can be absolute or relative to the current directory. |
| The number of items to commit in a transactional batch. The larger the specified number, the faster the import. However, a large number requires more memory and a larger transaction log in the database. The default is 1000. Specify -1 to import all items in a single batch. |
| The temporary directory to use in order to expand the data file during the import process. Typically, this argument is not needed. By default, an appropriate OS-specific temporary directory is used. The default directory is the one used by |
| Specifies that the import should not use the versioning system. Use this argument to import data into unversioned repositories. |
Print Arguments
exportRepository
and importRepository
use a compressed, binary file format. However, both utilities provide arguments to control message detail, and generate information about exported and imported data.
Utility message
Argument | Description |
---|---|
| Show more detail in the message. Specify multiple times in order to increase the level of detail. |
| print the current time in milliseconds with each info message |
Data file
The following arguments print the data in a file:
Argument | Description |
---|---|
| Prints a summary of the data file and exits. |
| Prints the IDs of data file items. |
| Prints detailed information about data file items, including item property values. |
| Constrains output to a specified range with the following arguments:
where
where Set |