Content Server Manual / Version 2512.0
Table Of Contents
The publishall tool is used in two cases: One, to quickly initialize a Master Live
Server with the current contents of the Content Management Server, usually in a quality assurance
or continuous integration environment; and two, to populate a new Master Live Server in case the original
Master Live Server database has been corrupted and is not recoverable from
a consistent backup. Before starting the publishall tool, you must create an empty database
schema, configure it in the Master Live Server, (re)start the server and wait
until it is completely initialized. You can then publish all content that is marked as published to the new server as follows:
usage: cm publishall [-a [-cq <query>]] [-t <threads>] [-v] [-?]
[--user <user> --password <password> [--url <ior url>] [--grpc-endpoint
<gRPC endpoint> --http-base-uri <base uri>]
--mls-user <user> --mls-password <password> [--mls-url <ior url>]
[--mls-grpc-endpoint <gRPC endpoint> --mls-http-base-uri <base uri>]]
available options:
Options Description
-?, --help Print usage information and quit.
-a, --all If given, publish all contents on
the CMS (except /Home).
Otherwise only publish contents
already marked as published.
-cq, --contentquery <query> If given together with -a, publish
all contents matching the given
query.
default: "NOT BELOW PATH '/Home'"
-d, --domain <domain name> domain for login
(default=<builtin>)
-g, --grpc-endpoint <gRPC endpoint> gRPC endpoint to connect to
--http-base-uri <HTTP base URI> HTTP base URI of Content Server
where HTTP servlets are provided
(e.g. blob servlet)
--mls-grpc-endpoint <gRPC endpoint> The gRPC endpoint of MLS.
--mls-http-base-uri <base uri> HTTP base URI of MLS where HTTP
servlets are provided (e.g. blob
servlet)
--mls-password <password> The password for MLS login
--mls-url <ior url> The IOR URL of MLS
--mls-user <user> The user for MLS login
-p, --password <password> password for login; you will be
prompted for password if not
given
-t, --threads <threads> The number of concurrent threads
to use for replicating content.
-u, --user <user name> user for login (required)
--url <ior url> url to connect to
-v, --verbose enables verbose output
Example 3.42. Usage of publishall
The parameters have the following meanings:
| Parameter | Description |
|---|---|
-a,--all | If given, publish all contents on the CMS (by default, except /Home). Otherwise, only publish contents already marked as published (that is, which were previously published to a lost or damaged MLS). |
-cq,--contentquery <query> | If given together with -a, publish all contents matching the given query. Note that there must not be any links from published contents to non-published contents, which for performance reasons is not checked by the publishall tool. default: "NOT BELOW PATH '/Home'" |
-t,--threads <threads> | Use the given number of threads for creating content on the master live server. Multiple threads may increase throughput in the presence of network and database latency. Default: 1 |
--cms-user <user> | The user for the Content Management Server login |
--cms-password <password> | The password for the Content Management Server login |
--cms-url <ior url> | The IOR URL of the Content Management Server |
--cms-grpc-endpoint <gRPC endpoint> | The gRPC endpoint of the Content Management Server. |
--cms-http-base-uri <base uri> | HTTP base URI of the Content Management Server where HTTP servlets are provided (e.g. blob servlet) |
--mls-user <user> | The user for the Master Live Server login |
--mls-password <password> | The password for the Master Live Server login |
--mls-url <ior url> | The IOR URL of the Master Live Server |
--mls-grpc-endpoint <gRPC endpoint> | The gRPC endpoint of the Master Live Server. |
--mls-http-base-uri <base uri> | HTTP base URI of the Master Live Server where HTTP servlets are provided (e.g. blob servlet) |
URI_CMS | The IOR URL of the Content Management Server |
USER_CMS | The user on the Content Management Server to be used for reading (typically admin) |
PW_CMS | The password on the Content Management Server |
URI_MLS | The IOR URL of the Master Live Server |
USER_MLS | The user on the Master Live Server to be used for writing (typically admin) |
PW_MLS | The password on the Master Live Server |
Table 3.46. Parameters of the publishall utility
Because two passwords are used, it is not possible to provide
credentials using the environment variable REPOSITORY_PASSWORD.
When there are rights rules for live groups to be published, required groups of the built-in user management will be automatically created, but the subgroup relationships must be established separately. This is in line with the normal behavior of the publisher.
During operation of the cm publishall tool, no changes should be made on the
Content Management Server.
Even in a multi-master environment, the tool publishes all content to the
Master Live Server. Afterwards, you may destroy unneeded parts
of the repository with cm multisitecleanup as described in
Section 3.10.4.5, “Splitting Content to Multiple Targets”.
Replication Live Servers that have been connected to the replaced Master Live Server cannot be connected to the new Master Live Server. They must be rebuilt, too.
The cm publishall tool will reset the publication date and the publisher user of all contents in
the content management environment, and the creation date of all contents in the live environment.
The original information about publication dates is irretrievably lost when the cm publishall tool is used.
Your business logic should therefore not rely too much on such metadata.


