close

Filter

loading table of contents...

Content Server Manual / Version 2107

Table Of Contents

3.13.1.1 Dump

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 [<id1> <id2> ...] [-b <[plain|text]>] [-cn <name>] [-d
       <domain name>] [-e <encoding>] [-f <path>] [-gn <name>] [-p
       <password>] [-pn <name>] [-t <paths>] [-U <uuids>] -u <user name>
       [-un <name>] [-url <ior url>] [-v]

available options:

 -b,--blob <[plain|text]>              select blob output behavior; plain
                                       (default): represent as descriptive
                                       string;text: additionally dump text
                                       (and alike) blob contents
 -cn,--contenttype-name <name>         names of content types to dump
 -d,--domain <domain name>             domain for login
                                       (default=<builtin>)
 -e,--encoding <encoding>              encoding of the dump output
                                       (default=Cp1252)
 -f,--file-name <path>                 dump the output to the given file
                                       (using UTF-8)
 -gn,--group-name <name>               names of groups to dump
 -p,--password <password>              password for login; you will be
                                       prompted for password if not given
 -pn,--processdefinition-name <name>   names of process definitions to
                                       dump
 -t,--paths <paths>                    path of contents to dump
 -U,--uuids <uuids>                    UUIDs of contents, groups, or users
                                       to dump
 -u,--user <user name>                 user for login (required)
 -un,--user-name <name>                names of users to dump
 -url,--url <ior url>                  url to connect to
 -v,--verbose                          enables verbose output

If not properly prefixed, IDs are interpreted as numeric content IDs or
UUIDs, content repository paths, user names, group names, user/group UUIDs
or content type names as appropriate.

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.
-b <plain|text> Controls blob-output behavior. Default plain mode will dump blobs with some data such as mime-type and blob size. Choosing text will dump text (and alike) blobs directly to the console or file (in addition to the normal blob data).
-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.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.