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 <ATG10dir>/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:

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

-project name
  
-noDeleteAll
  
[ -workflow name]
    

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 -noDeleteAll.

After running importRepository with this argument, the imported assets must be checked in manually through the Business Control Center.

If qualified by -workflow, the project uses the specified workflow; otherwise, it uses the default workflow:

/Common/commonWorkflow.wdl

-workspace name
  [ -nocheckin]
  [ -noDeleteAll] 

Specifies the workspace to use during the import operation, where name is a user-defined string with no embedded spaces and is unique among all workspace names. Use -workspace only during the initial import to the target repository, before you initialize any target sites.

The workspace is the area in the VersionManager where the import takes place. If the specified workspace does not exist, the system creates it.

You must specify this option or -project.

If qualified by -nocheckin, the import does not check in imported data. This allows use of the workspace for multiple import operations, so all assets can be checked in at the same time.

If qualified by -noDeleteAll, the imported data is added to items that already exist in the workspace. If omitted, all items in the workspace and target repositories are deleted before the import operation begins.

-checkinComment comment

Comment to use when checking in imported data. The default is import.

-username name

Username to use when checking in imported data. The default is importRepository.

This argument is required when the project argument is supplied, so the user can be identified as the project creator.

-versionManager path

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

-m startup-module
[-m startup-module]...

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 –m options, or delimit multiple modules with a semi-colon (;) on Windows and a colon (:) on UNIX.

This argument must precede all others, including -file.

-s server-name

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 -m.

–file source-file

Required, specifies the file with the data to import. The path that you specify can be absolute or relative to the current directory.

-batchSize size

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.

-temp directory-name

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 java.io.File.createTempFile(String, null, null), which should be appropriate for most systems.

-noworkspace

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

-v

Show more detail in the message. Specify multiple times in order to increase the level of detail.

-showTime

print the current time in milliseconds with each info message

Data File

The following arguments print the data in a file:

Argument

Description

-print

Prints a summary of the data file and exits.

-printItems [range]

Prints the IDs of data file items.

-printItemDetail [range]

Prints detailed information about data file items, including item property values.

range

Constrains output to a specified range with the following arguments:

  -printStartIndex index

where index is the zero-based starting index.

  -printEndIndex index

where index is the zero-based ending index.

Set index to -1 in order to print to the last item.


Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved. Legal Notices