Content Server Manual / Version 2101
Table Of Contents
The dump
utility prints out arbitrary objects of the CoreMedia CMS repository. You will probably
use it mainly to dump resources, but you can also dump users, processes etc.
usage: cm dump -u <user> [other options] [<id1> <id2> ... | -U <uuid1> <uuid2> ... | -t <path1> <path2> ... | -pn <name1> <name2> ... | -cn <name1> <name2> ... | -un <name1> <name2> ... | -gn <name1> <name2> ...] If not properly prefixed, IDs are interpreted as numeric content IDs or UUIDs, content repository paths, user names, group names or content type names as appropriate. Available options: -f,--file-name <file name> dump the output to the given file (using UTF-8) -d,--domain domain for login (default=<builtin>) -e,--encoding output encoding for dump (default=platform encoding) -cn,--contenttype-name names of contenttypes to dump -gn,--group <group> names of groups to dump -p,--password password for login -pn,--processdefinition-name names of processdefinitions to dump -U,--uuids UUIDs of contents to dump -t,--paths path of contents to dump -u,--user user for login (required) -un,--user-name <user> names of users to dump -url <ior url> url to connect to -v,--verbose enables verbose output
The options have the following meaning:
Parameter | Description |
---|---|
-f <file name>
| Name of the file where to dump the output using UTF-8 encoding. By default, the output is written to stdout. |
-e <encoding>
| Choose the encoding of the dump output. "ISO-8859-1" creates a dump in
ISO-Latin-1. "UTF-8" creates a Unicode dump. The default value is the platform
encoding. Consult the API documentation of java.nio.charset.Charset
of your particular JRE to find out other supported values. |
-un <names>
| The named users to dump. |
-gn <names>
| The named groups to dump |
-pn <names>
| The named process definitions ("workflows") to dump |
-cn <names>
| The named content types to dump |
-U <UUIDs>
| UUIDs of contents to dump. |
-t <paths>
| The paths of resources to dump. |
Table 3.12. Options of dump
The standard way to specify a resource to be dumped is its ID. To dump the root folder, for example, you call
> cm dump -u admin -p admin 1
and get a result like
content: coremedia:///cap/content/1 uuid: c4ca4238-a0b9-3382-8dcc-509a6f75849b type: Folder (coremedia:///cap/contenttype/Folder_) path: / created by: admin (coremedia:///cap/user/0), creation date: 2004-12-20T07:57:19+00:00 modified by: admin (coremedia:///cap/user/0), modification date: 2004-12-20T07:59:48+00:00 is place approved: true, place approved by: -, place approval date: 2004-12-20T07:57:19+00:00 is published: true, published by: -, publication date: 2004-12-20T07:57:19+00:00 to be deleted: false, to be withdrawn: false is checked out: false, current editor: - children: /Home (coremedia:///cap/content/5) /Inbox (coremedia:///cap/content/3) /System (coremedia:///cap/content/9) /work (coremedia:///cap/content/13) /work2 (coremedia:///cap/content/15)
The result for a content item looks similar; instead of the children you get detailed information about all
versions of the content item. If you don't know the IDs of the resources you want to dump, you can alternatively
specify their paths with the -t
option, or their UUIDs with -U
option, for example,
> cm dump -u admin -p admin -t /work/article1 -t /work/image1 > cm dump -u admin -p admin -U a935da47-271b-4712-9612-acf8aa1b965e
You can dump users and groups by specifying their names with the -n
option, for example,
> cm dump -u admin -p admin -un publisher -gn system
dumps the user publisher
and the group system
.
As alternative to this, you may use the option -U
to dump a user or group
by its UUID, just as you can do it for content UUIDs.
> cm dump -u admin -p admin -U c4b75f33-b75f-3b23-9e13-bbff072f1c4d
However, all these examples are only special convenient variants of invoking the dump
tool. As
you can see in the very first line of the result of dumping the root folder, the actual ID of the root folder
is not 1
, but coremedia:///cap/content/1
, and this format is the general way to use
dump
:
> cm dump -u admin -p admin coremedia:///cap/content/1
Each CoreMedia CMS object has such an ID and can be dumped. Try
the above example for dumping users and groups, and you will get IDs like coremedia:///cap/user/5
and coremedia:///cap/group/1
. You will obtain IDs of other objects by the other server tools:
The tool cm processdefinitions gives you IDs of workflow process definitions.
The tool cm processes gives you IDs of running processes.
Section 3.13.1.8, “Sessions” shows how to get IDs of open sessions.
The dump tool tries some additional heuristics to interpret strings given on the command line that do not match an ID pattern. IDs containing a slash are treated as a content repository path. String may also be interpreted as user names, group names or content type names if possible.