export Command

Administrative definitions, business object metadata, and checked-in files, can be exported from one root database and imported into another. Exporting and importing can be used across schemas of the same version level, allowing definitions and structures to be created and “fine tuned” on a test system before integrating them into a production database.

For conceptual information on this command, see MQL Concepts: Import and Export.

This page discusses:

User Level

System Administrator

Syntax

The command uses this syntax.

export ADMIN_TYPE TYPE_PATTERN [OPTION_ITEM [OPTION_ITEM]...] CLAUSEs
| into | file FILE_NAME [exclude EXCLUDE_FILE] [log LOG_FILE] [exception EX_FILE] ;
| onto |
  • ADMIN_TYPE is the administrative definition type to be exported. It can be any of the following:
    admin location role
    application menu rule
    association package[members] [usescustompackage|,usesallpackage] server
    attribute page site
    channel pathtype[xml][!archive] [continue][incremental[N]] store
    command person[!mail][!set] table
    customevent policy tenant
    dimension portal tenantadmin
    form process type
    format product uniquekey
    group program vault
    index relationship workflow
    interface report
    inquiry resource

    The ADMIN_TYPE is followed by a TYPE_PATTERN which filters the definitions to be exported.

  • OPTION_ITEM is an Export clause which further defines the requirements of the export to be performed. It can be any of the following:
    !archive incremental [N] xml
    continue !mail
    !icon !set

    !mail and !set (notmail and notset) are only meaningful when exporting person objects but should not cause syntax errors for other types.

  • OPTION_ITEMs can be used in any order before the Into File/Onto File clause.
  • FILENAME is the name of a new or existing file to which to write the export data.
  • CLAUSEs include:
    • xml
    • from | vault VAULT_NAME |
           | set SET_NAME     |
    • [!]file
    • {!]captured
    • {!]history
    • {!]relationship
    • {!]state
    • {!]archive
    • continue
    • incremental [N]
    • where WHERE_CLAUSE

Into File/Onto File

Exported data can be appended to a file or written to a new file using the onto file or into file forms of the Export command. The into file form creates a new file, or overwrites an existing file of the name specified as FILENAME. The onto file form appends to an existing file.

!Mail and !Set Clauses

When exporting person objects, there is an associated workspace. The workspace contains IconMail and sets (as well as Visuals) saved by the person being exported. When exporting Persons, workspaces are exported by default, but you can omit mail and sets using the !mail and !set clauses. These clauses are valid with the export person and export admin commands only. For more information, see MQL Concepts: Migrating Databases.

!mail and !set (notmail and notset) are only meaningful when exporting Person objects but should not cause syntax errors for other types.

For example, to export all persons without mail or sets, the following can be used:

export person * !mail !set into file person.mix;

Incremental Clause

Use the incremental clause to export a specified number (N) of unarchived objects. Unarchived objects are objects that have not yet been exported, or have been changed since they were last exported. If no number is specified, all unarchived objects are exported. Without this clause, export does not look at the archived setting and exports all objects fitting the criteria.

Although you can export administrative changes incrementally, it is recommended that during database migration, Business and System Administration tasks are avoided.

!Archive Clause

Use the !archive clause not to set the archive setting on objects being exported. Use this clause to facilitate performance of large exports that do not require an incremental export.

Continue Clause

Use the continue clause to make t3DSpace proceed with additional exports even if an error is generated. When continue is used, it is helpful to use the log and/or exception clauses as well, so that diagnostics can be performed, and the data that caused the error is trapped.

XML Clause

Use the XML clause to export data into XML format. For details, see MQL Concepts: Export Requirements and Options.

Exclude Clause

Use the exclude clause to point to a map file that lists any objects to be excluded. It includes the exclude keyword and a map file name. For example:

export admin TEST* into file teststuf.mix exclude nogood.txt;

The contents of the exclude map file for Administrative objects must follow the following format:

ADMIN_TYPE NAME
ADMIN_TYPE NAME
  • ADMIN_TYPE can be any of the administrative object types: vault, store, location, server, attribute, program, type, relationship, format, role, group, person, policy, form, association, or rule.
  • NAME is the name of the definition instance that should be excluded in the import. Wildcard patterns are allowed.

As indicated, each definition to be excluded must be delimited by a carriage return. The Exclude clause is optional.

Log FILENAME Clause

Apply this clause if you want to specify a file for error messages and details of the export process. The output is similar to using the verbose flag, but includes more details.

Exception FILENAME Clause

Exception FILENAME provides a file location where objects are written if they fail to export. The file will contain the type and name of any objects that could not be exported. This is often used with a log file so that after the diagnostics are performed from the information in the log file, the exception file can be used as a guide to know what should be exported.

Export Bus Command

Use the Export Businessobject command to export business objects from a vault or a set.

Syntax

export bus[inessobject] BUSID [from |vault VAULT_NAME|] [OPTION_ITEM {OPTION_ITEM}]
                                    |set SET_NAME    |
| into | file FILENAME [FILE_TYPE FILENAME [FILE_TYPE FILENAME]...];
| onto |
  • BUSID is the Type, Name, and Revision of the business object. Wildcard patterns are allowed. (You cannot use OIDs with export bus).
  • VAULT_NAME is the name of the vault from which to export the business object(s). While neither is required, you can specify either a vault or a set from which to export, but not both.
  • SET_NAME is the name of the set from which to export the business objects. While neither is required, you can specify either a vault or a set from which to export, but not both.
  • OPTION_ITEM is an Export clause which further defines the requirements of the export. It can be any of the following:
    !archive !history !state
    !captured !icon xml
    continue incremental [N]
    !file !relationship
  • OPTION_ITEMs can be used in any order before the into|onto file clause.
  • FILENAME is the name of the file in which to store the exported information.
  • FILE_TYPE FILENAME offers a way to log errors and trap exceptions, as well as to exclude objects in the export.
  • FILE_TYPE can be any of the following:
    exclude log exception

When FILE_TYPEs are specified on export, the use keyword is not required. However, when used on import, it is.

Excluding Information

When exporting business objects, the default is to include everything about the object. However, the OPTION_ITEMS can be used to further define the requirements of the export to be performed, by specifying information to exclude. The following clauses can be used to exclude information when exporting business objects.

!archive !icon !relationship
!file !history !state

For example, to export a single object without including history, use:

export businessobject Assembly “ABC 123” A !history into file obj.mix;

To export a single object without including its icon, use:

export businessobject Assembly “ABC 123” A !icon into file obj.mix;

To export a single object without any of its relationships, use:

export businessobject Assembly “ABC 123” A !relationship into file obj.mix;

To export all objects from vault TEMP and reset the current state to the beginning of the lifecycle, use:

export businessobject * * * from vault TEMP !state into file obj.mix;

Exclude Clause

Use the exclude clause to point to a file that lists any objects to be excluded. For example:

export businessobject TEST* into file teststuf.mix exclude nogood.txt;

The contents of the exclude file for business objects must follow the following format:

businessobject OBJECTIDbusinessobject OBJECTID
  • OBJECTID is the OID or Type Name Revision of the business object and can include the in VAULTNAME clause, to narrow down the search.

As indicated, each business object to be excluded must be delimited by a carriage return.

Excluding Files

When exporting (or importing) business objects, the options for its files are:

  • !file -- does not export files when exporting business objects. By default, both file data and content are exported.
  • !captured -- does not export captured store file content. This flag affects content only, not file metadata.

Otherwise, both file metadata and actual file contents are written to the export file. In this case any file sharing is lost (resulting in duplication of files).

If you use !file , you cannot use the captured flag because files without metadata cannot be included. (Attempts to do this will not return an error, but no file information or content will be included). For more information, see MQL Concepts: Migrating Databases.

Exporting Connections

Use this syntax to export details about a connection (relationship).

export connection RELATIONSHIP_TYPE 
  [ xml             ]
  [ from | vault VAULT_NAME | ]
         | set SET_NAME     |
  [ [!]history      ]
  [ [!]archive      ]
  [ continue        ]
  [ incremental [N] ]
  [ where WHERE_CLAUSE ]
  | into | file FILENAME [ exclude FILENAME ] [ log FILENAME ] [ exception FILENAME ];
  | onto |

The clauses work the same as described above.