The term migration describes
the process of taking data located outside of a Rational® Synergy database and creating that
data in a Rational Synergy
database in a way that represents the external data.
For example, you might have files in some directory organization
in a file system location and want to create projects, directories,
and files that represent that data in a Rational Synergy database.
In Rational Synergy, migration
is performed in two separate phases:
- Use the ccm migrate command to create an import
package that describes the data to be created.
- Use the ccm import command to import the data
created in the previous step and create the objects in the Rational Synergy database.
The
advantage of this two-phase approach is that if you are migrating
several separate applications or components, you can perform the first
step on each piece. Then, you can perform the more time consuming
import of all the packages afterward, for example, overnight.
The
ccm migrate operation has two types
of migration:
- A full migrate, which results in a new set
of projects containing new instances of directories and files representing
the data to be migrated. The generated import package represents all
of the objects that are to be migrated.
- An incremental migrate, which updates an existing
project hierarchy with only the changes required to match the data
to be migrated. The existing project hierarchy is used as a reference
to determine the changes. The generated import package represents
the new, changed, or removed objects compared with the reference project
hierarchy.
If you have several releases of an application to be migrated,
here is a typical usage pattern:
- Perform a full migrate and import of the first
release, creating a project hierarchy representing that release.
- Perform a copy project operation to create
a version of the project for the next release.
- Perform an incremental migrate and import of
the next release into the existing project created by the previous
step. The import must be performed before proceeding to the next release
to ensure that you have the correct history of changes.
- Repeat steps 2 and 3 as required for each subsequent release.
The ccm migrate operation uses mapping rules to determine which
files to process or ignore. The operation also uses mapping rules
to determine object properties, including their Rational Synergy type. Many mapping rules
are determined by data on type definitions. For example, if a java type
definition is associated with a suffix matching pattern for .java,
then typically a file to be migrated with a name such as ContextFactory.java is
represented by a Rational Synergy
object of type java.
Previewing and showing information about migrate
The ccm
migrate command supports showing the details of the object,
either as a preview without creating an import package, or in addition
to creating the import package. You can use standard formatting options
to specify what data is shown and the format of the presentation.
Two
types of data can be shown in migrate format strings:
- Special migrate properties.
- Migrate properties that correspond to Rational Synergy attributes after being
imported.
The following special migrate property keywords are supported:
Table 1. Special migrate property keywordsProperty name |
Description |
ACTION |
The type of migrate action being performed: - New
An instance of the object is created.
- Modified
An existing object is modified by checking out a new
version.
- Ignored
Anew object is ignored.
- Deleted
An existing object is removed from the project because
it is absent from the source path, or a migrate rule is ignoring it.
- Unchanged
An existing object is unchanged.
|
INDENTED_NAME |
The name of the object prefixed with zero, one,
or more leading spaces. The number of leading spaces is determined
by the indentation level of directory nesting with respect to the
top-level project. |
SOURCE_PATH |
The absolute path of the source object being
migrated. |
RELATIVE_PATH |
The relative path of the source object being
migrated with respect to the top-level project. |
Any property name that is not one of these special cases
is treated as a property of the migrate object. In most cases, a Rational Synergy attribute
is created when the object is imported. For example, the name property
corresponds to the name attribute after the data
is imported.
The migrate command supports the following
subcommands: