Import Export Data Migration Tools
Supported Operations
Import/Export provides IMPORT, EXPORT and DELETE operations for supported portal entities.
Import
Adds the entities defined in the specified XML file(s) to the portal database. If the specified entities are already present – determined by Id
, Name
, or other primary key, as appropriate – this operation will update the existing entity to match the information provided in the XML.  Importing the same file several times has the same effect as importing it once – you are free to re-import files without negative consequence (though see Warning below).
Usage
>ant crn-import -Ddir={path-to-directory} [-Dpattern={regex}]
Where path-to-directory
is a file system directory, absolute or relative, containing uPortal Import/Export XML files; and regex
is an (optional) Java Regular Expression specifying a file name pattern that candidate files must match or be ignored by the importer.
The -Dpattern Argument
Regex special characters overlap heavily with OS/Shell special characters. It's often better to avoid the -Dpattern
argument altogether. You can always place desired files into a new directory for import.
Warning
Never re-import an outdated .fragment-layout
file against a portal database with existing users. There is a risk that the folder and channel nodes on the fragment will receive new IDs that don't match up with the existing IDs, and (therefore) users' customizations to that fragment will become corrupted. Always export a .fragment-layout
first, apply your changes, then re-import. The fresh export will contain the proper IDs, which will be restored on import.
NOTE: It's a good idea to test this process and verify that it's working correctly before attempting it on production.
Deployments that do not allow user customizations to DLM fragments are exempt from this warning.
Export
Creates XML files representing the requested entities and writes them to the specified file system location.
Usage
>ant crn-export [-Ddir={path-to-directory}] -Dtype={entity-type} [-Dsysid={entity-identifier}]
Where path-to-directory
is a file system directory, absolute or relative, wherein XML will be written; and entity-type
is any supported entity type (see table below); and entity-identifier
is the Id
or Name
of a single entity of the specified type. The -Dsysid
argument is not required for entity types that begin with "all-."
Named Sub-directories
On export, XML documents will be organized into sub-directories by entity type: e.g. channel
, layout
, user
, etc.
Delete
Removes the specified entities as well as dependent (orphaned) entities from the portal database.
Warning
The DELETE feature should be used with extreme caution and is more appropriate for DEV and TEST portals than for PROD. It is possible to make your portal unusable by deleting the wrong thing.
Usage
>ant crn-delete -Dtype={entity-type} [-Dsysid={entity-identifier}]
Where entity-type
is any supported entity type (see table below); and entity-identifier
is the Id
or Name
of a single entity of the specified type.
Table of Entity Types
entity-type | sysid | export | delete | notes |
---|---|---|---|---|
all | All portal entities | Combines the following sub-types:
| ||
all-layouts | All user layouts | Normal users generate | ||
all-profiles | All user profiles | May generate more than one document per user | ||
all-permissions | All permissions | A | ||
all-permission_sets | All permission_sets | A | ||
all-memberships | All local (RDBMS) memberships | A | ||
all-channels | All channels | Â | ||
all-channel-types | All channel types | Â | ||
all-groups | All local (RDBMS) groups | A | ||
all-group_memberships | All local (RDBMS) group_memberships | A | ||
all-users | All users | Â | ||
all-themes | All themes | Â | ||
all-structures | All structures | Â | ||
all-entity-types | All entity types | "Entity types" here refers to the | ||
all-fragment-definitions | All fragment definitions | Requires the | ||
layout |
| Â | Â | Â |
profile |
| Â | Â | May generate more than one document per user |
channel |
| Â | Â | Â |
channel-type |
| Â | Â | Â |
group |
| Â | Â | A |
group_membership |
| Â | Â | A |
user |
| Â | Â | Â |
theme |
| Â | Â | Â |
structure |
| Â | Â | Â |
entity-type |
| Â | Â | Â |
fragment-definition |
| Â | Â | Â |
=not specified or not supported