Sun ONE logo     Previous      Contents      Index      Next     
Sun ONE Portal Server 6.0 Administrator's Guide



Chapter 12   Command-Line Utilities

The Sun™ ONE Portal Server product provides a set of command-line utilities in addition to its graphical user interface.

The command-line utilities are listed in Table 12-1 and pertain to administrative tasks only. This two column table lists the commands in the first column and a brief description in the second column.

Table 12-1    Sun ONE Portal Server Command-Line Utilities

Command

Description

dpadmin

Enables display profile objects to be retrieved, added, modified, and removed from a display profile document.

par

Performs functions involving the .par file for transport of channels and providers.

rwadmin

Enables the administrator to manage Rewriter data.

rdmgr

Performs all the functions needed by the Search server to work with resource descriptions and the search database.

sendrdm

Provides a mechanism for CGI or command-line based search.

StartRobot

Starts the Robot searching (crawling) the web.

Also available is the command-line interface amadmin for iPlanet™ Directory Server Access Management Edition administration. The primary purpose of the amadmin tool is to help an administrator perform batch administrative tasks on the Directory Server, for example, create, register, and activate new services; and create, delete, and read (get) organizations, people containers, groups, roles, and users. For more information, see the iPlanet Directory Server Access Management Edition 5.1 Programmer's Guide.

dpadmin

Description

The dpadmin command enables display profile objects to be retrieved, added, modified, and removed from a display profile document by using the subcommands. All interactions with display profile objects must be in their native XML format. The dpadmin command can operate on a single display profile document only.

The dpadmin command requires:

  • A subcommand (see "Subcommands").
  • A user distinguished name and password to access the directory server.
  • A target display profile document.
  • A distinguished name to identify the LDAP node or --global (-g) option for the global level display profile document.


  • Note

    A display profile document is uniquely identified by the -d or -g option:

    global: -g

    organization: -d "o=sesta.com,o=isp"

    sub-organization: -d "o=org1,o=sesta.com,o=isp"

    role: -d "cn=role1,o=sesta.com,o=isp"

    user: -d "uid=user1,ou=people,o=sesta.com,o=isp"



Syntax

This section describes the dpadmin command syntax. You cannot mix long-named options with short ones in one command line.

Short-Named Format

$ dpadmin list|modify|add|remove [command-specific options] -u uid   
-w password {-g|-d dn} [-l locale] [-r] [-b] [-h] [file]

$ dpadmin batch [-c] -f batch-script-filename [-l locale] [-b] [-h]

Long-Named Format

$ dpadmin list|modify|add|remove [command-specific options] --runasdn uid --password password {--global|--dn dn} [--locale locale] [--dryrun] [--verbose] [--help] [file]

$ dpadmin --version

$ dpadmin batch [--continue] --file batch-script-filename [--locale locale] [--verbose] [--help]

Subcommands

The dpadmin command takes these subcommands:

list

Description

This subcommand retrieves the specified display profile node object from the specified display profile document. If no display profile node object is specified, the entire display profile document is retrieved. The display profile object is displayed in its native XML format on standard out.

The list subcommand takes these options:

  • Administrator's distinguished name and password for accessing the LDAP database by using the -u or --runasdn and -w or --password options respectively. These options are required.
  • Display profile node object to display defined by the -g or --global option for the global level node, or -d or --dn option with a specific non-global level node specified. The -g or -d option is required. In the absence of the command-specific -n or --name option, the -d or --dn option displays the entire display profile document. The -g or --global option displays the entire root display profile document.
  • Name of the display profile node object to display by using the -n or --name option.
  • The -r or --dryrun option. This option runs a dryrun or test of the subcommand. Subcommands run with -r or --dryrun option report the error or success of the subcommand to sysout but do not make the subcommand changes to LDAP.

Syntax

$ dpadmin list -u|--runasdn uid -w|--password password {(-g|--global)|(-d|--dn dn)} [-n|--name name] [-r|--dryrun]

$ dpadmin list -h|--help

Options

Table 12-2, which describes what options are supported, contains two columns: the first column lists the possible options, arguments or operands for the list subcommand; the second column gives a brief description.

Table 12-2    list Subcommand Options

Argument/Operand

Description

-d or --dn

Specifies the distinguished name in the LDAP node to access the display profile document. The -d or -g option is required.

-g or --global

Specifies the global level node in LDAP to access the display profile document. The -d or -g option is required.

-n or --name

Specifies the fully qualified name of the display profile container, channel, or provider object to display. This option is not required.

-r or --dryrun

Reports the error or success of the subcommand to sysout, but does not put the resulting changes of the subcommand in LDAP. This is an optional option.

-u or --runasdn

Specifies the distinguished name of the user to use to bind to the directory server. This option is required.

-w or --password

Specifies the password of the distinguished name of the user used to bind to the Directory Server. This option is required.

Examples

Example 1

$ dpadmin list -n TemplateTableContainer -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp"

This example gets the TemplateTableContainer object from the o=sesta.com organization node and prints it to standard out.

Example 2

$ dpadmin list -n mailcheck -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -g

This example goes to the global level only to get thet mailcheck object and if found, prints it to standard out.

Example 3

$ dpadmin list -n TemplateTableContainer/Bookmark2 -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp"

This example gets the channel named Bookmark2 located in the container TemplateTableContainer and prints it to standard out.

modify

Description

This subcommand changes the value of an existing display profile object. It reads data for the object from standard input or from the file specified as an argument to the command.

This XML data always requires a proper XML header as well as a set of names that uniquely defines which display profile object is to be modified. An example of proper XML header is:

   <?xml version="1.0" encoding="utf-8" standalone="no"?>   

   <!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">

The semantics of the modify subcommand vary depending on the type of the display profile object being modified. When the combine option is specified, the new elements (like properties) in the display profile object are combined with the existing ones rather than replacing them. The variations of the modify subcommand are as follows:

  • Display Profile—An entire display profile document can be changed to the new object value specified by using a file. When the combine option is specified, every display profile object in the display profile document is recursively combined. See the information below for how combine works for each display profile object.
  • Channel or Container—A channel or container can be changed to the new object value. When modifying a channel or container, if the parent option is:
    • Specified, the specified parent container is searched for a channel or container that matches the name of the new display profile object. If it is found, it is replaced by the new display profile object.
    • Absent, the root display profile object is assumed to be the parent container. So the root is searched for a channel or container that matches the name of the new display profile object. If it is found, it is replaced with the new display profile object.

    When the combine option is specified, the existing properties, available, and selected objects are combined with the new display profile objects.

  • Properties—A display profile object's properties can be changed to the new value. The parent option is required to modify a display profile object's properties. A display profile node object (either channel or container) or display profile provider object that matches the specified name is searched for under the specified parent. If found, the object's properties object is replaced by the new display profile object. When the combine option is specified, the existing properties are combined with the new display profile object.
  • Available or Selected—The Available or Selected list in a container can be replaced with the new display profile object. The parent option is required to modify display profile objects of this type. A display profile container that matches the parent name is searched for. Then the Selected or Available object is replaced by the new display profile object. When the combine option is specified, the existing Selected or Available object is combined with the new display profile object.
  • String, Boolean, Integer, Collection, or Locale—A String, Boolean, Integer, Collection, or Locale property in a display profile object can be replaced by new display profile object property.
  • If the parent option is specified, the display profile node (either a channel or container) or display profile provider (in that order) that matches the specified name is searched for. If found, a property that matches the name of the new property is searched for. If found, the property in the display profile object is replaced by new display profile object property.

    If the parent option is absent, then the display profile root node is used and the property is inserted at the root node.

    When the combine option is specified, the existing Collection or Locale object is combined with the new display profile object. The combine option is not supported for atomic display profile properties such as String, Boolean, and Integer.

    The atomic display profile properties such as String, Boolean, and Integer need not be named. If unnamed, the name is assumed to be equal to the string representation of the value. For example, the following two display profile integer objects are equal:

       <Integer value="3"/>

       <Integer name="3" value="4"/>

  • Provider—An existing display profile provider object can be replaced with the display profile provider of the same name. A display profile provider object that matches the name of the new display profile provider object is searched for under the root display profile node. If present, the new display profile provider object is inserted under the root display profile object, replacing the existing display profile provider of the same name. Because providers can only exist under the root node (the root node is an implicit container), the parent option must not be specified.

The modify subcommand takes these options:

  • Administrator's distinguished name and password for accessing the LDAP database by using the -u or --runasdn and -w or --password options respectively. These options are required.
  • Display profile node object to modify defined by the -g or --global option for the global level node, or -d or --dn option with a specific non-global level node specified. The -g or -d option is required.
  • Name of the file where the XML input is included by using the file argument. This argument is optional. When not used, XML input is expected from standard input.
  • Fully qualified name of the parent of the display profile object to be modified by using the -p or --parent option.
  • The -r or --dryrun option. This option runs a dryrun or test of the subcommand. Subcommands run with -r or --dryrun option report the error or success of the subcommand to sysout but do not make the subcommand changes to LDAP.
  • The -m or --combine option. This option performs a merge of display profile objects.

Syntax

$ dpadmin modify -u|--runasdn uid -w|--password password {(-g|--global)|(-d|--dn dn)} [-p|--parent parent] [-r|--dryrun] [-m|--combine]  file|<<EOF

$ dpadmin modify -h|--help

The data that is supplied to the dpadmin modify command is either from a file or from standard input (an XML fragment that follows the command).

Options

Table 12-3, which describes what options are supported, contains two columns: the first column lists the possible options, arguments or operands for the modify subcommand; the second column gives a brief description.

Table 12-3    modify Subcommand Options

Argument/Operand

Description

-d or --dn

Specifies the distinguished name in the LDAP node to access the display profile document. The -d or -g option is required.

-g or --global

Specifies the global level node in LDAP to access the display profile document. The -d or -g option is required.

file

Specifies a path to an XML file that contains an XML fragment. If present, the file argument must be the last argument on the command line. The XML fragment must conform to the display profile DTD. If the file argument is absent from the modify subcommand, then input must be redirected into dpadmin from standard input.

-m or --combine

Combines the specified display profile objects with the new display profile objects. The combine option can only be used with these display profile objects: display profile root, channel, container, properties, available, selected, collection, and locale. This is an optional option.

-p or --parent

Specifies the fully qualified name of the parent of the display profile object to be modified. This is an optional option.

-r or --dryrun

Reports the error or success of the subcommand to sysout, but does not put the resulting changes of the subcommand in LDAP. This is an optional option.

-u or --runasdn

Specifies the distinguished name of the user to use to bind to the Directory Server. This option is required.

-w or --password

Specifies the password of the distinguished name of the user used to bind to the Directory Server. This option is required.

Examples

Example 1

$ dpadmin modify -p TemplateTableContainer -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp" <<EOF

<?xml version="1.0" encoding="utf-8" standalone="no"?>

<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">

<Channel name="NewNews" provider="newsprovider">

   <Properties>

      <String name="title" value="News Channel"/>

      <String name="description" value="This channel is all about news"/>

   </Properties>

</Channel>

EOF

This example modifies (replaces) the channel named NewNews in the container TemplateTableContainer with value specified as XML text on standard input.

Example 2

$ dpadmin modify -p TemplateTableContainer/NewNews -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp" farble.xml

This example replaces the property named in the file farble.xml with the new object in farble.xml file, where farble.xml contains:

<?xml version="1.0" encoding="utf-8" standalone="no"?>

<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">

<String name="welcome" value="Hi, welcome to farble land!!!!"/>

Example 3

$ dpadmin list -n TemplateTableContainer -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp"

...

<Collection name="news">

   <Collection name="bar">

      <String name="msg" value="hi"/>

   </Collection>

</Collection>

...

$ dpadmin modify -p TemplateTableContainer -u "uid=amAdmin,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp" -m <<EOF

<?xml version="1.0" encoding="utf-8" standalone="no"?>

<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">

<Collection name="news">

   <Collection name="bar">

      <String name="msg2" value="woo hoo"/>

   </Collection>

</Collection>

EOF

$ dpadmin list -n TemplateTableContainer -u "uid=amAdmin,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp"

...

<Collection name="news">

   <Collection name="bar">

      <String name="msg" value="hi"/>

      <String name="msg2" value="woo hoo"/>

   </Collection>

</Collection>

...

In this example, using the combine option, a new property named msg2 is added to the collection named bar. Note that the existing property, msg still remains in the result.

Example 4

$ dpadmin list -n test -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp"

<Container name="test" provider="testprovider">

   <Properties>

      <String name="title" value="test"/>

   </Properties>

   <Available/>

   <Selected/>

   <Channels>

      <Channel name="test1" provider="test1provider">

         <Properties>

            <Collection name="news">

               <String name="msg1" value="blah"/>

               <Collection name="bar">

                  <String name="msg2" value="hi"/>

               </Collection>

            </Collection>

         </Properties>

      </Channel>

   </Channels>

</Container>

$ dpadmin modify -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp" -m <<EOF

<?xml version="1.0" encoding="utf-8" standalone="no"?>

<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">

<Container name="test" provider="testprovider">

   <Properties>

      <String name="title" value="Test Container"/>

   </Properties>

   <Available>

      <Reference value="test1"/>

   </Available>

   <Selected>

      <Reference value="test1"/>

   </Selected>

   <Channels>

      <Channel name="test1" provider="test1provider">

         <Properties>

            <Collection name="news">

               <String name="msg1" value="123"/>

               <Collection name="bar">

                  <String name="msg3" value="123/>

               </Collection>

            </Collection>

         </Properties>

      </Channel>

   </Channels>

</Container>

EOF

$ dpadmin list -n test -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp"

<Container name="test" provider="testprovider">

   <Properties>

      <String name="title" value="Test Container"/>

   </Properties>

   <Available>

      <Reference value="test1"/>

   </Available>

   <Selected>

      <Reference value="test1"/>

   </Selected>

   <Channels>

      <Channel name="test1" provider="test1provider">

         <Properties>

            <Collection name="news">

               <String name="msg1" value="123"/>

               <Collection name="bar">

                  <String name="msg2" value="hi"/>

                  <String name="msg3" value="123"/>

               </Collection>

            </Collection>

         </Properties>

      </Channel>

   </Channels>

</Container>

In this example, the values of title and msg1 are replaced with the new values. Available and Selected have both had a Reference value added. The news collection has added msg3. This example shows that the -m or combine option with the modify subcommand can be used to combine and replace as necessary.

add

Description

This subcommand adds a new display profile object to the display profile. This subcommand requires that the object to be added does not exist in the display profile. The add subcommand reads data for the new object from standard input or from the file specified as an argument to the command. Data for the new object must be XML and conform the Sun ONE Portal Server display profile DTD.

This XML data always requires a proper XML header as well as a set of names that uniquely defines which display profile object is to be modified. An example of proper XML header is:

   <?xml version="1.0" encoding="utf-8" standalone="no"?>   

   <!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">



Note

Appendix B contains the display profile DTD.



The semantics of the add subcommand vary depending on the type of the display profile object being added. That is:

  • Display profile—An entire display profile document can be added to the specified LDAP node. If the document already exists at the node, then an error is reported. The parent option must not be specified when adding a new display profile document.
  • Channel or container—A channel or container can be added. If the parent option is present, the parent display profile object is located for the given name and under that parent container, the specified channel or container is added. If the parent option is absent, the parent display profile object is assumed to be the root display profile object, so under root the specified channel or container object is added.
  • Properties—Because a properties bundle is required for all display profile nodes and display profile provider objects, they already exist and cannot be added. Use the modify subcommand.
  • Available or selected—Because available and selected objects are required for a display profile container, they already exist and cannot be added. Use the modify subcommand.
  • String, Boolean, Integer, Collection, or Locale—The display profile object String, Boolean, Integer, Collection, or Locale properties can be added. The parent option must be specified to add display profile object properties of this type. Under the specified parent, a display profile node object (either a channel or container) or display profile provider is searched for (in that order) that matches the name. If found, the given display profile property is added to the display profile node object or display profile provider object.
  • The atomic display profile properties such as String, Boolean, and Integer need not be named. If unnamed, the name is assumed to be equal to the string representation of the value.

  • Provider—A display profile provider is inserted under the root node. Because providers can only exist under the root node, do not use the parent option. If an object of the same name already exists, then an error is reported.

The add subcommand takes these options:

  • Administrator's distinguished name and password for accessing the LDAP database (the -u or --runasdn and -w or --password options respectively). These options are required.
  • Display profile document to add or the display profile document where the object must be added (the -d or --dn option). The display profile object to add defined by the -g or --global option for the global level node. The -g or -d option is required.
  • Name of the file where the XML input is included (the file argument).
  • Fully qualified name of the parent of the display profile node object to add or add to (the -p or --parent option).
  • The -r or --dryrun option. This option runs a dryrun or test of the subcommand. Subcommands run with -r or --dryrun option report the error or success of the subcommand to sysout but do not make the subcommand changes to LDAP.

Syntax

$ dpadmin add -u|--runasdn uid -w|--password password {(-g|--global)|(-d|--dn dn)} [-p|--parent parent] [-r|--dryrun] file|<<EOF

$ dpadmin add -h|--help

The data supplied to the dpadmin add command is either from a file or from standard input (an XML fragment that follows the command).

Options

Table 12-4, which describes what options are supported, contains two columns: the first column lists the possible options, arguments or operands for the add subcommand; the second column gives a brief description.

Table 12-4    add Subcommand Options

Argument/Operand

Description

-d or --dn

Specifies the distinguished name in the LDAP node to access the display profile document. The -d or -g option is required.

-g or --global

Specifies the global level node in LDAP to access the display profile document. The -d or -g option is required.

file

Specifies a path to an XML file that contains an XML fragment. If present, the file argument must also be the last argument on the command line. The XML fragment must conform to the display profile DTD. If the file argument is absent for the add subcommand, then input must be redirected into dpadmin from standard input.

-p or --parent

Specifies the fully qualified name of the parent of the display profile object to add.

-r or --dryrun

Reports the error or success of the subcommand to sysout, but does not put the resulting changes of the subcommand in LDAP. This is an optional option.

-u or --runasdn

Specifies the distinguished name of the user to use to bind to the directory server. This option is required.

-w or --password

Specifies the password of the distinguished name of the user used to bind to the directory server. This option is required.

Example

$ dpadmin add -p SampleTabPanelContainer/Postal -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp" <<EOF

<?xml version="1.0" encoding="utf-8" standalone="no"?>

<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">

<Collection name="zipCodes">

   <Integer value="98012"/>

   <Integer value="98036"/>

   <Integer value="94025"/>

   <Integer value="95112"/>

</Collection>

EOF

In this example, the command adds the collection property named zipCodes specified on standard input to the channel named Postal in the container named SampleTabPanelContainer.

remove

Description

This subcommand removes an existing display profile object from the display profile. If the object to be removed does not exist in the specified display profile document, an error is reported. This subcommand takes type, parent, and name options.

The type option specifies the type of display profile object to remove. The parent option specifies the fully qualified name of the parent display profile object to remove the display profile object from. The parent display profile object type varies depending on the type of display profile object being removed. The name option specifies the name of the object to remove.

The semantics of the parent and name options vary depending on the type of display profile object being removed. Table 12-5 contains two columns: the first column lists the possible values for the type options; the second column gives a brief description of exactly what is removed.

Table 12-5    dpadmin remove parent and name semantics

Value for type Option

Semantics for parent and name Options

root

Use this option to remove the entire display profile document from the LDAP node as specified by the distinguishedname option or global level display profile if -g (--global) option is supplied. The name option is not needed when type=root.

channel

The name option is required. If the parent option is absent, then the parent container is assumed to be the root display profile node. Otherwise, the parent option is assumed to be the parent container name of the channel to remove. The name option specifies the name of the channel or container to remove.

provider

In the sample portal, the parent option must not be specified since providers reside under the root display profile node. The name option is required and specifies the provider to remove.

property

The parent option specifies the name of the parent display profile node or display profile provider object to remove the property from. If the parent option is absent, then the root display profile node is assumed to be the parent object.

The name option specifies the name of the property to remove. If the name option is absent, an error is reported. For unnamed display profile properties, the name is equal to the string representation of the value.

available or selected

Both parent and name options are required. The parent option is assumed to name the parent display profile container or channel object to remove the available or selected reference from. The name option gives the value of the reference to be removed. If the name option is absent, then an error is reported.

The remove subcommand takes these options:

  • Administrator's distinguished name and password for accessing the LDAP database by using the -u or --runasdn and -w or --password options respectively. These options are required.
  • Name of the display profile node object to remove by using the -n or --name option. This option is required except when type=root.
  • Display profile document node in the LDAP database where the display profile document containing the object to be removed exists by using the -d (--dn) or -g (--global) option. Either the -d (--dn) or -g (--global) option is required.
  • Type of display profile node object to remove by using the -t or --type option. This option is required.
  • Fully qualified name of the parent of the display profile node object to remove by using the -p or --parent option.
  • The -r or --dryrun option. This option runs a dryrun or test of the subcommand. Subcommands run with -r or --dryrun option report the error or success of the subcommand to sysout but do not make the subcommand changes to LDAP.

Syntax

$ dpadmin remove -u|--runasdn uid -w|--password password {(-g|--global)|(-d|--dn dn)} [-n|--name name] [-p|--parent parent][-r|--dryrun] -t|--type type

$ dpadmin remove -h|--help

Options

Table 12-6, which describes what options are supported, contains two columns: the first column lists the possible options, arguments or operands for the remove subcommand; the second column gives a brief description.

Table 12-6    remove Subcommand Options

Argument/Operand

Description

-d or --dn

Specifies the distinguished name in the LDAP node to access the display profile document. The -d or -g option is required.

-g or --global

Specifies the global level node in LDAP to access the display profile document. The -d or -g option is required.

-n or --name

Specifies the display profile container, channel, or provider object to remove. This option is required except when type=root.

-p or --parent

Specifies the fully qualified name of the parent of the display profile object to remove.

-t or --type

Specifies the type of display profile object being removed. This option is required.

-r or --dryrun

Reports the error or success of the subcommand to sysout, but does not put the resulting changes of the subcommand in LDAP. This is an optional option.

-u or --runasdn

Specifies the distinguished name of the user to use to bind to the directory server. This option is required.

-w or --password

Specifies the password of the distinguished name of the user used to bind to the directory server. This option is required.

Examples

Example 1

$ dpadmin remove -t property -p Bookmarks -n locations -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp"

This example, the command removes the property named locations from the channel or container named Bookmarks.

Example 2

$ dpadmin remove -t provider -n "test1" -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -g

Remove the provider test1 from the global display profile

Example 3

$ dpadmin remove --type channel --parent TemplateTableContainer --name "Test" --runasdn "uid=amAdmin,ou=people,o=sesta.com,o=isp" --password joshua --dn "o=sesta.com,o=isp"

This example removes the channel named Test that is in the parent container named TemplateTableContainer.

Example 4

$ dpadmin list -n X -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp"

<Container name="X" ...>

   <Channels>

      <Container name="Y" ...>

         <Channels>

            <Channel name="z" .../>

         </Channels>

      </Container>

   </Channels>

</Container>

To remove channel z, you can execute any of the following commands:

$ dpadmin remove -t channel -p X -n Y/z -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp"

$ dpadmin remove -t channel -p X/Y -n z -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp"

$ dpadmin remove -t channel -n X/Y/z -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp"

batch

Description

The batch subcommand enables the processing of multiple display profile commands in an optimized fashion. The subcommands are listed in a batch script file (required) and executed consecutively. If an error occurs, the default is to report the error and exit. The -c or --continue option denotes continuous processing mode. In this mode, if an error occurs, it is reported and dpadmin continues with the next subcommand.

The command batch scripts must be text (ASCII) documents and can contain any number of subcommands for input into dpadmin, except a batch subcommand. A subcommand must be entered on a single line (the new line character indicates the end of the command). For each subcommand, the administrator's distinguished name and password must be specified in the command line. The syntax for the subcommand is exactly the same as if the subcommand was entered directly into a shell (without the dpadmin part). The script cannot contain XML, so subcommands that require XML input must have it in a file. If the distinguished name (or DN) contains space(s), use double-quotes around it.

The following is an example batch-script file (each command is on a single line):


add -p PostalMailer -u uid=amAdmin,ou=people,o=sesta.com,o=isp -w joshua -d o=sesta.com,o=isp zipCodes.xml

add -p PostalStamps -u uid=amAdmin,ou=people,o=sesta.com,o=isp -w joshua -d o=sesta.com,o=isp zipCodes.xml

add -p PostalRates -u uid=amAdmin,ou=people,o=sesta.com,o=isp -w joshua -d "cn=hr role,o=sesta.com,o=isp" zipCodes.xml

modify -p PostalMailer -u uid=amAdmin,ou=people,o=sesta.com,o=isp -w joshua -d o=sesta.com,o=isp farble.xml


The batch subcommand takes the -c or --continue option and requires the name of the batch script file specified by using -f or --file.

Syntax

$ dpadmin batch [-c|--continue] -f|--file batch-script-file

$ dpadmin batch -h|--help

Options

Table 12-7, which describes what options are supported, contains two columns: the first column lists the possible options, arguments or operands for the batch subcommand; the second column gives a brief description.

Table 12-7    batch Subcommand Options

Argument/Operand

Description

-c or --continue

Indicates a continuous operation mode. Errors are reported, but dpadmin continues with the next subcommand if this option is specified. By default, dpadmin exits after reporting an error.

-f or --file

Specifies the batch script file. This argument is required.

Options

Table 12-8 summarizes the dpadmin command options supported. The table is organized by subcommands listed in subheads. It contains two columns: the first column lists the possible options, arguments or operands; the second column gives a brief description.

Table 12-8    dpadmin Command Options

Argument/Operand

Description

--version

Prints descriptive information about the utility, such as its version, legal notices, and other similar information to standard output. Any subcommand and all other options are ignored when this option is present.

Options Common to all Subcommands

-b or --verbose

Produces more debugging messages.

-h or --help

Prints out a brief help page to standard output. If no subcommand is present, a generic help page for dpadmin is printed. If one of the dpadmin subcommands is present, then a brief help page that is specific to the subcommand is printed.

-l or --locale

Localizes all debug/error messages in the specified locale. If not specified, it defaults to system locale.

The list, add, modify, and remove Subcommands Options

-d or --dn

Specifies the distinguished name in the LDAP node to access the display profile document. The -d or -g option is required.

-g or --global

Specifies the global level node in LDAP to access the display profile document. The -d or -g option is required.

-r or --dryrun

Reports error or success of subcommand to sysout. Does not put the resulting changes of the subcommand in LDAP.

-u or --runasdn

Specifies the distinguished name of the user to use to bind to the Directory Server. This is used with the list, modify, add, and remove subcommands only. This option is required.

-w or --password

Specifies the password of the distinguished name of the user used to bind to the Directory Server. This option is required.

The list and remove Subcommand Options

-n or --name

Specifies the fully qualified name of the display profile container, channel, or provider object to display or remove. This option is not required.

The add, modify, and remove Subcommands Options

-p or --parent

Specifies the fully qualified name of the parent of the display profile object to add, to modify, or to remove.

The add and modify Subcommands Options

file

Specifies a path to an XML file that contains XML fragment. If present, the file argument must be the last argument on the command line. The XML fragment must conform to the display profile DTD and contain a proper XML header. Subcommands that require XML input include modify and add. If the file argument is absent for these subcommands, then input must be redirected into dpadmin from standard input.

The modify Subcommand Options

-m or --combine

Combines the specified display profile objects with the new display profile objects. This can be used only with the modify subcommand. The combine option can only be used with these display profile objects: Display Profile root, Channel, Container, Properties, Available, Selected, Collection, and Locale.

The remove Subcommand Options

-t or --type

Specifies the type of display profile object to be removed. Types can be: root, channel, provider, property, available or selected.

The batch Subcommand Options

-c or --continue

Indicates a continuous operation mode. This is used with the batch subcommand only. Errors are reported, but dpadmin continues with the next subcommand if this option is specified. By default, dpadmin exits after reporting an error.

-f or --file

Specifies the batch script file. This ASCII file is used only with the batch subcommand.

par

Description

The par command performs functions involving the specified .par file. It can be used for exporting and importing channels and/or providers from and into the Sun ONE Portal Server.

Syntax

The par command syntax is described in this section. Mixing long-named options with short ones in one command line is not recommended.

Short-Named Format

par containers -r uid -p password [-d] dn|global

par describe [-d] parfile

par export -r uid -p password [-m] [-d] [-v] parfile dn|global {exportfile|from=}...

par import -r uid -p password [-o] [-d] [-v] parfile [dn|global [op...]]

par import -r uid -p password  -a [-d] [-v] parfile [dn|global]

Long-Named Format

par containers --runasdn uid --password password [--debug] dn|global

par describe [--debug] parfile

par export --runasdn uid --password password [--modify] [--debug] [--verbose] parfile dn|global {exportfile|from=}...

par import --runasdn uid --password password [--overwrite] [--debug] [--verbose] parfile [dn|global [op...]]

par import --runasdn uid --password password --auto [--debug] [--verbose] parfile [dn|global]

Subcommands

The following subcommands are supported:

containers

Description

Lists all available containers and channels in a particular display profile document, indicated by the specified directory server name (or global). This can be used as an aid to formulating other commands.

Syntax

par containers -r|--runasdn uid -p|--password password [-d|--debug] [-v|--verbose] dn|global

Example

par containers -r "uid=amAdmin,ou=people,o=sesta.com,o=isp" -p joshua -d "o=sesta.com,o=isp"

In this example, the command lists all available containers in the display profile document residing in the LDAP node "o=sesta.com,o=isp".

describe

Description

Describes the contents of the specified .par file, including the entries, and any built-in autoextract operations defined for the entries.

Syntax

par describe parfile

Example

par describe myfile.par

In this example, the command output or description of the myfile.par may be something like the following:


Class Root: /
Property Based File Root: /pbfiles
Display Profile Root: /dp
Static Content Root: /static
Entry: mychannel
AutoExtract:dpnode=o%3Dsesta.com%2Co%3Disp,channel,entry=mychann el
DP Document: this my JSP based channel.
Channel: SampleJSP.a
Includes: Property Based File, root templateBaseDir, path default/mychannel/samplecontent.jsp (channel)
Includes: Property Based File, root templateBaseDir, path default/mychannel/sampledoedit.jsp (channel)
Includes: Property Based File, root templateBaseDir, path default/mychannel/sampleedit.jsp (channel)
Includes: Property Based File, root templateBaseDir, path default_en_US/mychannel/samplecontent.jsp
(channel)
Includes: Property Based File, root templateBaseDir, path default_en_US/mychannel/sampledoedit.jsp
(channel)
Includes: Property Based File, root templateBaseDir, path default_en_US/mychannel/sampleedit.jsp
(channel)

export

Description

Populates the specified .par file by exporting the provider or channel information from the portal server. The command takes a .par file, a directory server name argument (or keyword global) corresponding to the desired display profile document to update, and any number of (requires at least one) exportfile or from specifications. The from specifications contain exactly the same information as an export file; the only difference is that the "lines" are separated by semicolons.

The par export command without the -m option creates a .par file. The par export command with the -m option is used to update and / or add to an already existing .par file that defines a provider, channel or container.

Syntax

par export -r|--runasdn uid -p|--password password [-d|--debug] [-v|--verbose] parfile dn|global {exportfile|from=}...

par export -r|--runasdn uid -p|--password password [-d|--debug] [-v|--verbose] -m|--modify parfile dn|global {exportfile|from=}...

Example

par export -r "uid=amAdmin,ou=people,o=sesta.com,o=isp" -p joshua mychannel.par "o=sesta.com,o=isp" myexport.txt

Here myexport.txt contains:


from: channel mychannel
directory: templateBaseDir . mychannel
description: this is my JSP based channel

In this example, the command exports the channel definition and template files for mychannel into mychannel.par from the "o=sesta.com,o=isp" dn. Also, if it were a JSPProvider channel, the directory line transfers all of the .jsp files, including locale-specific versions.

import

Description

Imports objects from the specified .par file into the portal server. The command takes a .par file, and optional arguments for the display profile document to import the objects into the indicated display node in the directory server (or the root display profile indicated by the keyword global), and operations to be performed. If these things are not specified, they are taken from the .par file. The auto option can be used to indicate that you wish to simply perform the autoextract operations already contained in the .par file.

To add a new channel, you can use the par import command with or without the -o option. If a channel already exists, you must use the -o option with the par import command to completely replace (overwrite) the old channel. You can use this subcommand to import providers as well as channels.

Syntax

par import -r|--runasdn uid -p|--password password [-o] [-d|--debug] [-v|--verbose] parfile [dn|global [op...]]

par import -r|--runasdn uid -p|--password password -a|--auto [-d|--debug] [-v|--verbose] parfile [dn|global]

Examples

Example 1

par import -r "uid=amAdmin,ou=people,o=sesta.com,o=isp" -p joshua --auto myfile.par "o=sesta.com,o=isp"

In this example, the command extracts the channel from myfile.par file, if that is the automatic operation defined in the myfile.par parfile.

Example 2

par import -r "uid=amAdmin,ou=people,o=sesta.com,o=isp" -p joshua myfile.par "o=sesta.com,o=isp" "entry=mychannel,channel=anothername,avail=topcontainer"

In this example, the command extracts the channel explicitly, installing it with a different name in the target dn, and making it available in container topcontainer.

Options

Table 12-9, which describes what options are supported in alphabetical order, contains two columns: the first column lists the possible options for the par command; the second column gives a brief description.

Table 12-9    par Command Options

Options

Description

-a or --auto

Applies the autoextract operations from the .par file. Use with the import command. There should be no operations specified on the command line in this case. The dn argument may still be specified; if specified, it replaces the dn in the autoextract operations. If operations are specified on the command line they are ignored.

-d or --debug

Produces extra debugging information on error messages.

-m or --modify

Updates an existing .par file rather than replacing it.Use with the export command to Any new files added for an entry supplement or replace the old ones. Also, use this command to add new files to an existing provider or channel by using a .par file.

-o or --overwrite

Overwrites existing channels. Use with the import command to replace existing channels.

-p or --password

Specifies the password for authentication. Required for all of the subcommands except describe. If not specified, the par utility prompts for it.

-r or --runasdn

Specifies the distinguished name of the user for authentication. Required for all of the commands except describe. If not provided, the par utility prompts for it. Use the format uid=userName,ou=people,o=organizationName,o=organizationalUnit

-v or --verbose

Describes operations as they are executed. Use with the import and export commands.

Arguments

Table 12-10, which describes what arguments are supported, contains two columns: the first column lists the possible arguments for the par command; the second column gives a brief description.

Table 12-10    par Command Arguments

Argument

Description

dn

Specifies the distinguished node in the directory server to access. Use the format "o=organizationName,o=organizationalUnit"

global

Specifies the global level node in LDAP to access the display profile document.

exportfile

These files each correspond to an entry (provider, channel, or provider/channel combination) in the .par file, and simply specify the data to be inserted into the specified .par file. It can be a small file if the information is too large to list on the command line. See Export Files for more information.

from

Specified on the command line, this is taken as equivalent to an export file containing the "from" line, followed by an equal to ("=") sign, and any other lines separated by a semicolon (";"). See from in Table 12-11 for more information on line properties.

op

Specifies the operation to perform. See Operations for more detail.

parfile

Specifies the par file to operate upon; that is, indicates the par file to import, export, or describe.

Export Files

These files simply specify data to be inserted into a .par file. The file consists of lines containing a keyword, followed by a colon and white space delimited fields. The line "from:" is required and it must be the first line of the file. Lines beginning with "#" are treated as comments.

Table 12-11, which describes the export file line properties, contains two columns: the first column lists the possible line keywords; the second column gives a brief description.

Table 12-11    Export File Line Properties

Line

Description

from: types name

"from" indicates what entity is being exported. types can be "channel", "provider", or "channel,provider", and "channel+provider". The name indicates the channel name, or a provider name if a provider is being exported. The name must be URL encoded if the name contains white space (+), commas (%2C), colons (%3A), semicolons (%3B), plus signs (%2B), or percent signs (%25).

auto: none

"auto" specifies the autoextract operation for the entry. It takes the op argument followed by the operation. "none" can also be entered, suppressing the autoextract. If no "auto:" line is specified, a default autoextract is produced. The default operation is to extract the channel and/or provider with its original names.

auto: op

file: root|. path [types]

"file" indicates that a file, based on a property setting, is to be included. The property can come from either the "desktop properties" file, located by default in /etc/opt/SUNWps/desktop/desktopconfig.properties file or from the display profile visible to a getProperty() call for the item being exported or imported. root specifies the root of the file location and path specifies the path to the rest of the file. root is a property name that corresponds to a directory (like). If root is given as ".", the file is assumed to be static content located at the web server's doc root. You can also specify the types of operation the file is to be associated with, defaulting to "channel". types can be "channel", "provider", or "channel,provider", and "channel+provider".

class: class [types]

"class" indicates that a class file is to be packaged with the entry, and you may optionally specify the types of operations that the class file are associated with. If not specified, "provider" is assumed. types can be "channel", "provider", or "channel,provider", and "channel+provider"; also, when specifying both, you can use a space.

directory: root|. dir +|.|filter [types]

"directory" implies an entire directory search with all non-directory files to be included as if entered as "file" lines. It includes the capability of specifying a "filter", that is a directory component which must be present in recursive directory searches. root specifies the root of the directory, or "." to indicate static content. dir is the directory underneath the root to search from, which can be given as "." to start at the root itself. filter specifies the filter component which must be in the directory, which implies a recursive descent. It can be given as "+" for a recursive descent with no filter, or "." for no recursive descent (just the contents of the actual directory). You can also specify the types of operation, which default to "channel". types can be "channel", "provider", or "channel,provider", and "channel+provider".

entry: name

"entry" specifies the entry name used in the .par file. If not specified, it defaults to the name from the "from: " line.

desc: text

Any number of "desc" lines may appear, and are concatenated together as a user-visible description packaged with the entry.

Operations

Each operation (op), in the export file or on the command line, must be specified as a comma separated list of keywords that can have values, most of which are optional. The operations are in a blank or space separated list. Each operation is in the following format.

dpnode=dn,entry=name,provider[=name],channel[=name],container=name[,av ail=name,selected]

dpnode

This specifies the distinguished name in the directory server (or the keyword global) for the display profile document that this operation is targeted at. May not apply if the context it is being specified in has already provided this. For example, if the import subcommand defines the distinguished name, the distinguished name in the file is ignored.

entry

This specifies the entry name in the .par file. This is not needed if the:

  • .par file only contains one entry, as the operation defaults to that entry
  • Operation is already associated with an entry such as the autoextract option for an entry.

The par utility defaults to the first entry in the file if an entry is not specified.

provider

This indicates that a provider extraction is to take place. If the name is missing, it uses the name packaged with the provider in the .par file.

channel

This indicates that a channel extraction is to take place. If the name is missing, it uses the name provided with the channel in the .par file.

container

This applies only to channel extractions and indicates which container the channel is to be inserted into. If omitted, the channel is inserted into the "channels" element at the display profile document root.

avail

This applies only to channel extractions and indicates a container whose "avail" (or available) list is to receive a reference to the new channel. If omitted, no new channel reference is created.

selected

This applies only if "avail" was used. It indicates that the container whose "avail" list received a reference, also has a reference placed in its "selected" list.

If the op information is in both the par import command and in the .par file, the command information takes precedence.

Par Files

This section contains supplemental information on the par file format. You do not require this information to run the par command.

The par file is a jar file with manifest entries for transporting channels, providers, and their associated files. It is intended allow flexibly when installing providers, channels, or both. The .par file contains 4 major types of files:

  1. XML documents containing the provider and or channel information for the display profile. This document is a parEntry , as described in the display profile DTD. This parEntry contains a channel, a provider, or a channel/provider combination.
  2. Class files associated with the provider or channel.
  3. Property based files. These are general files associated with the channel or provider (usually the channel), which have to be deployed underneath some configurable root on the portal server.
  4. Static content files. These are files deployed as documents on the web server.

Par File Contents

Table 12-12, which describes the headers the .par file must contain, contains two columns: the first column lists the required global headers; the second column gives a brief description.

Table 12-12    Global Headers

Header

Description

PS-Version

Specifies a portal server specific version number of the .par file. Also verifies that this is a .par file.

PS-DefaultEntry

Names the entry used for operations involving an unnamed entry.

PS-DPRoot, PS-ClassRoot, PS-PBFileRoot, PS-StaticRoot

Indicates the root directories in the archive for parEntry documents, classes, property based files, and static content, respectively. If unspecified, the corresponding files are rooted at the top of the archive.

The .par file must include a named entry for each parEntry XML file. Table 12-13, contains two columns: the first column lists the possible headers; the second column gives a brief description. The section for each named entry may contain the following headers:

Table 12-13    Named Entry Headers

Header

Description

PS-EntryName

Specifies the command visible name of the entry.

PS-AutoExtract

Specifies the autoextract operation for the entry, if one exists.

PS-Include

Contains a comma separated list of archived files specified by their actual archive path. The path implies what type of file they are according to the "root" specifications. The files are appended with a parenthesized number, which corresponds to the types of operations the file applies to (a mask with 1 for provider, 2 for channel). This can be ignored if there are no files other than the XML document associated with the entry.

If the .par file contains only one entry, entries need not be named in manipulating the file since the default entry is the entry used if none is named.

rwadmin

Description

The rwadmin command enables you to manage the Rewriter data available in the iPlanet Directory Server Access Management Edition Rewriter service.

Syntax

The rwadmin command syntax is described in this section.

Short Named Format

rwadmin list -u uid -w password [-l locale] [-b] [-h]

rwadmin store -u uid -w password [-l locale] [-b] [-h] filename

rwadmin get -r rulesetname -u uid -w password [-l locale] [-b] [-h] [filename]

rwadmin remove -r rulesetname -u uid -w password [-l locale] [-b] [-h]

Long Named Format

rwadmin list --runasdn uid --password password [--locale locale] [--verbose] [--version] [--help]

rwadmin store --runasdn uid --password password [--locale locale] [--verbose] [--version] [--help] filename

rwadmin get --rulesetid rulesetname --runasdn uid --password password [--locale locale] [--verbose] [--version] [--help] [filename]

rwadmin remove --rulesetid rulesetname --runasdn uid --password password [--locale locale] [--verbose] [--version] [--help]

Subcommands

These subcommands are supported:

list

Description

This command lists all the available ruleset names.

Syntax

rwadmin list -u|--runasdn uid -w|--password password

Example

rwadmin list -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua

In this example, the command displays names of all available rulesets.

store

Description

This command stores the rules available in the local file system into iPlanet Directory Server Access Management Edition. To store the DefaultRuleSet, use the following command:

rwadmin store -u uid -w password /resources/DefaultRuleSet.xml

where /resources/DefaultRuleSet.xml is the location of the ruleset stored in rewriter.jar file. When this command is executed, if a ruleset with the same ID already exists, no new data are stored. Delete the existing ID and try again.

Syntax

rwadmin store -u|--runasdn uid -w|--password password filename

Example

rwadmin store -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua /opt/data/ExampleRuleSet.xml

In this example, the command stores the rules available at /opt/data/ExampleRuleSet.xml into the iPlanet Directory Server Access Management Edition.

get

Description

This command gets the ruleset from iPlanet Directory Server Access Management Edition. If filename is provided, the retrieved ruleset is stored in the specified file, or else it is displayed on stdout (or the console).

Syntax

rwadmin get -r|--rulesetid ruleset -u|--runasdn uid -w|--password password [filename]

Examples

Example 1

rwadmin get -r "ExampleRuleSet" -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua

In this example, the command retrieves the ruleset named ExampleRuleSet from iPlanet Directory Server Access Management Edition and displays it on the console.

Example 2

rwadmin get -r "ExampleRuleSet" -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua /tmp/abc.xml

In this example, the command retrieves the ruleset named ExampleRuleSet from iPlanet Directory Server Access Management Edition and saves it in the file abc.xml in the /tmp directory.

remove

Description

This command deletes the ruleset from iPlanet Directory Server Access Management Edition. This command deletes the ruleset without any warning.

Syntax

rwadmin remove -r|--rulesetid ruleset -u|--runasdn uid -w|password password

Example

rwadmin remove -r "ExampleRuleSet" -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua

In this example, the command deletes the ruleset whose name is ExampleRuleSet from iPlanet Directory Server Access Management Edition.

Options

Table 12-14 summarizes the rwadmin command options supported in alphabetical order. It contains two columns: the first column lists the possible options; the second column gives a brief description.

Table 12-14    rwadmin Command Options

Option

Description

-b or --verbose

Specifies to rwadmin to provide detailed information what is happening when the command is executed.

filename

Specifies, with the store subcommand, the file to get the ruleset data from when importing into the iPlanet Directory Server Access Management Edition. Specify this with the get subcommand to indicate the file in which the retrieved ruleset data should be stored.

-h or --help

Prints out a brief help page to standard output. If no subcommand is present, a generic help page for rwadmin is printed. If one of the rwadmin subcommands is present, then a brief help page that is specific to the subcommand is printed.

-l or --locale

Localizes all output messages in the specified locale. If not specified, it defaults to system locale.

-r or --rulesetid

Specifies the name of the ruleset to operate upon

-u or --runasdn

Specifies the distinguished name of the user to use to bind to the directory server.

--version

Prints descriptive information about the utility, such as its version, legal notices, and other similar information to standard output. Any subcommand and all other arguments are ignored when this option is present.

-w or --password

Specifies the password of the distinguished name of the user used to bind to the directory server.

rdmgr

Description

The rdmgr command is the main command to work with the Search service. There are two types of subcommands: ones that are used to work with resource descriptions (RDs); and ones that are used for database maintenance. The rdmgr command is normally run in a search-enabled portal server instance directory, which is the /server-instance-directory/deployment_uri directory. This is the deployment URI path you selected at install time. If you chose the default Portal Server install, this is the /var/opt/SUNWps/https-servername/portal directory.

Syntax

The general syntax of the rdmgr command is:

#   rdmgr   [subcommand]  [options]  [input]

The RD subcommands more specifically follow this syntax:

#  rdmgr   [-umgdnUL]  [-ACSTNPq]  [-a att,att,...] [-b number

[-c search.conf] [-i charset] [-o charset] [-j number] [-l number

[-p progress] [-r number] [-s schema] [-y dbname] [filename|-Q query]

The database maintenance subcommands more specifically follow this syntax:

#  rdmgr   [-OXIERGBL]  [-ASTDVNP]  [-a att,att,...] [-b number

[-c search.conf] [-j number] [-l number] [-p progress]  [-r number] 

[-s schema] [-y dbname

You can use -l number to set the log level number for any RD or database subcommand. A setting of 1 (default) logs all the rdmgr commands. The higher the number the more detail the log file contains. The possible levels are 1- 100. If this option is not specified, this command assumes the setting defined by the debug-loglevel in the search.conf file. The log file name is defined by the rdmgr-logfile in the search.conf file.

Where the -c search.conf option gives the location of the search.conf file. If you do not use this option, the default value is config/search.conf in the current directory. The search.conf file lists all the specific search values you have set.

You can use -p progress to show the progress of any RD or database subcommand. If you only enter -p, the progress is displayed on stdout.

Subcommands

The following subcommands are supported:

Resource Description Subcommands

Description

The RD subcommands allow you to run a batch process to insert or replace RDs, merge RDs filtered by a view, retrieve RDs filtered by a view, delete RDs and count RDs. Table 12-15 is a two-column table that lists the subcommand in the first column with a brief description in the second column.

Table 12-15    rdmgr RD Subcommands 

Subcommand

Description

-u

Inserts or replaces RDs. This subcommand is the default subcommand if none is stated.

-m

Merges RDs filtered by a view.

-g

Retrieves RDs filtered by a view.

-d

Deletes RDs.

-n

Counts the RDs

-U

Dumps database in SOIF to stdout.

-L

Lists selected fields from the database to stdout. Requires the -a att  option.

Syntax

#  rdmgr   [-umgdnUL]  [-ACSTNPq]   [-a att,att,...] [-b number

[-c search.conf] [-i charset]  [-o charset] [-j number] [-l number

[-p progress] [-r number] [-s schema] [-y dbname] [filename|-Q query]

Options

Table 12-16, which describes the options supported, is a two-column table that lists the options or arguments in the first column with a brief description in the second column.

Table 12-16    Options for rdmgr RD Subcommands 

Argument/Operand

Description

-A

Specifies not to use schema aliases in config/schema.rdm file in the default search directory. Use with the u and m subcommands.

-C

Specifies not to create the database if the database is missing. Use with the u and m subcommands.

-S

Disables schema checking. Use with the u and m subcommands.

-T

Operates on the taxonomy. The taxonomy is used for browsing and classifying the database contents and is in the config/taxonomy.rdm file in the default search directory. Use with any resource description command.

-N

Specifies that the function specified in the command works only on the non-persistent data in the resource description. RDs in the database are a merge of persistent and non-persistent data.

-P

Specifies that the function specified in the command works only on the persistent data in the resource description. RDs in the database are a merge of persistent and non-persistent data.

-q

Deletes SOIF input file on exit. Use with the u, m, g and d subcommands.

-a att,att...

Specifies attribute view list. The att names are not case sensitive and can be any attribute whether or not they are defined in the schema; for example, author or title. If you have a multi-valued att like class-1, class-2, and class-3, only enter class as the att name.

-b number

Sets the indexing batch size to this number of RDs. Use with the u and m subcommands.

-c search.conf

Specifies where the search.conf file is. If you do not use this option, the default is the config/search.conf file in the default search directory. Other wise, you have to give the full path to the file.

-i charset|-o charset

Specifies the character set of the SOIF streams. The -i option specifies the character set of the input SOIF stream. The -o option specifies the character set of the output SOIF stream. For example, ISO8859-1, UTF-8, UTF-16. Character sets ISO8859-1 through ISO8859-15 are supported. Use -i with the u, m and d subcommands. Use -o with the g, U and L subcommands.

-j number

Limits the number of retrieved results. Use with the u subcommand. If not stated, the default value is unlimited except with the Q option (default 20).

-l number

Sets the log level to number. A setting of 1 (default) logs all the rdmgr commands. The higher the number the more detail the log file contains. The possible levels are 1- 100. This works with all subcommands.

-p {stdout|stderr|

filename}

Prints or displays progress to stdout, stderr or the filename file. This works with all subcommands. Timing information is reported in seconds.

-r number

Specifies that reports should be generated every number of RDs. The default is 500. Use with the progress option. Use with the u, m, g, d and U subcommands.

-s schema

Specifies the schema definition file. If you do not use this option, the default is the config/schema.rdm file in the search server instance directory.

-y dbname

Specifies the search database name. If you are running this command on any database other than the default one, you need to use this option. The default database is the database defined in the config/search.conf file labeled datbase-name=logicaldbname.

filename|-Q query

Specifies the filename of a file of RDs using the default schema (use -s option for any other schema) in SOIF format.

This input option is used with the u, m, g and d subcommands.

The query is any regular search query.



Note

If you enter rdmgr with no subcommand, the command assumes the -u subcommand. If you enter rdmgr with no subcommand and a query (-Q), the command assumes the -g subcommand.



Examples

Example 1

Set environment variable LD_LIBRARY_PATH to /opt/SUNWps/lib.

In the /var/opt/SUNWps/https-sesta.com/portal directory, type

# /opt/SUNWps/bin/rdmgr -U

In this example, the entire default database of resource descriptions is printed out to stdout in UTF-8 SOIF format.

Example 2

In the default search directory of /var/opt/SUNWps/https-sesta.com/portal,

# /opt/SUNWps/bin/rdmgr -d -Q java

In this example, all the resource descriptions that have java any where in them are deleted.

Database Maintenance Subcommands

Description

The database subcommands allow an administrator to optimize a search database, to truncate or empty a database, to reindex a database, to delete expired RDs from a database, and recover a database. Table 12-17 is a two-column table that lists the subcommand in the first column with a brief description in the second column.

Table 12-17    rdmgr Database Maintainance Subcommands 

Subcommands

Description

-O

Optimizes the database. If you are running this subcommand on any database other than the default one, you need to use the -y option. The default database is the database defined in the config/search.conf file labeled datbase-name=logicaldbname. For example, the default value is datbase-name=default and the default database directory is db/default.

Databases do not normally need to be optimized.

-X

Truncates or empties a database. If you are running this subcommand on any database other than the default one, you need to use the -y option. Disk space used for indexes is recovered, but disk space used by the main database is not recovered, instead, it is reused as new data is added to the database.

-I

Reindexes a database. If you are running this subcommand on any database other than the default one, you need to use the -y option.

-E

Deletes expired RDs from a database. If you are running this subcommand on any database other than the default one, you need to use the -y option.

-R

Recovers all databases. This is a global command and takes no options. All database processes, including other rdmgr instances and the main search server must be stopped before running this command.

-G

Repartitions the database. This command takes no options. The partitions are defined in the config/search.conf file labeled datbase-partitions=p1,p2,p3,.... where p1, p2, and p3 are the filenames of the partitions. The server needs to be restarted after running this command.

-B

Completely deletes the database. Recovers all the disk space. There should be no indexing happening and the Portal server has to be off when you run this subcommand.

-L

Lists selected fields from the database to stdout. Requires the -a att  option. If you are running this subcommand on any database other than the default one, you need to use the -y option.

Syntax

#  rdmgr   [-OXIERGBL]  [-ASTDVNP]   [-a att,att,...] [-b number

[-c search.conf] [-j number] [-l number] [-p progress]  [-r number 

[-s schema] [-y dbname

Options

Table 12-18, which describes what options are supported, is a two-column table that lists the options or arguments in the first column with a brief description in the second column.

Table 12-18    Options for rdmgr Database Maintenance Subcommands 

Argument/Operand

Description

-A

Specifies noto use schema aliases in config/schema.rdm file in the default search directory. Use with the I subcommand.

-S

Disables schema checking. Use with the I subcommand.

-T

Operates on the taxonomy. The taxonomy is used for browsing and classifying the database contents and is in config/taxonomy.rdm file in the default search directory. Use with O, X, I, E, B, U, and L subcommands.

-D

Updates the database only; do not update the index. Use with E and X commands.

-V

Updates the index only; do not update the database. Use with E and X commands.

-N

Specifies that the function you specified in the command works only on the non-persistent data in the resource description. RDs in the database are a merge of persistent and non-persistent data. Use with I, E, U, and L commands.

-P

Specifies that the function you specified in the command works only on the persistent data in the resource description. RDs in the database are a merge of persistent and non-persistent data. Use with I, E, U, and L commands.

-a att,att...

Specifies attribute view list. The att names are not case sensitive and can be any attribute whether or not they are defined in the schema; for example, author or title. If you have a multi-valued att like class-1, class-2, and class-3, only enter class as the att name.

-b number

Sets the indexing batch size to this number of RDs. Use with the I command.

-c search.conf

Specifies where the search.conf file is. If you do not use this option, the default is the config/search.conf file in the default search directory. Other wise, you have to give the full path to the file.

-j number

Limits the number of retrieved results. Use with the E subcommand. If not stated, the default value is unlimited.

-l number

Sets the log level to number. A setting of 1 (default) logs all the rdmgr commands. The higher the number the more detail the logfile contains. The possible levels are 1- 100. This works with all subcommands.

-p {stdout|stderr|
filename}

Prints or displays progress to stdout, stderr or filename. This works with all subcommands.

-r number

Specifies that reports should be generated every number of RDs. The default is 500. Use with the progress option. Use with the u, m, g, d and U subcommands.

-s schema

Specifies the schema definition file. The default is the config/schema.rdm file in the default search directory.

-y dbname

Specifies the search database name. If you are running this command on any database other than the default one, you need to use this option. You do not need to use this option for the default database. The default database is the database defined in the config/search.conf file labeled datbase-name=filename.

Examples

Example 1

In the default search directory,

# /opt/SUNWps/bin/rdmgr -E -j 13 -p stdout -r 5

In this example, up to 13 RDs are removed from the database if they are expired. The progress report to stdout, prints the elapsed time in seconds and the number of RDs processed so far after every five resource descriptions.

Example 2

The Search engine is not responding. In the default search directory,

# /opt/SUNWps/bin/rdmgr -R

This recovers all the search databases and makes the Search Engine available again. Use this command to release stale locks in the database and to roll back incomplete data transactions. Stale locks and incomplete transactions can result from a database process being abnormally terminated.

Usage Message and Version Subcommands

Table 12-19 lists the subcommands to display the usage message or to view the version information in the first column and a brief description in the second column.

Table 12-19    rdmgr Subcommands for Usage Message and Version

Argument/Operand

Description

-h or -?

Shows the usage message.

-v

Shows version information

Return Codes

The rdmgr command returns return codes to the shell.

0 - Success

1 - Failure

sendrdm

Description

The sendrdm command provides a mechanism for a CGI or command-line based search. An rdm (resource description manager) request is sent in SOIF format to the Search server. This command is normally run in a search-enabled Portal Server instance directory, which is the /server-instance-directory/deployment_uri directory. This is the deployment uri path you selected at install time. If you chose the default Portal Server install, this is the /var/opt/SUNWps/https-servername/portal directory. Where the value of servername is the default Portal Server instance name—the fully qualified name of your Portal Server.



Note

For the default installation, set the environment variable LD_LIBRARY_PATH to /opt/SUNWps/lib.



Syntax

The syntax of the sendrdm command is:

# sendrdm [-dv] [-t n] [-u uri] RDM-in [RDM-out]

Options

Table 12-20 summarizes sendrdm command options supported in alphabetical order. It contains two columns: the first column lists the possible options; the second column gives a brief description.

Table 12-20    sendrdm Command Options

Argument/Operand

Description

-d

Specifies Debug mode. The default is off. This option turns it on.

-t n

Specifies time in seconds. Command times out after n seconds. Default is 300 seconds.

-u uri

Designates the uri directory for the server you are importing from. Enter the full path name.

-v

Specifies the search format version.

RDM-in

Specifies the RDM request file name. This argument is required.

RDM-out

Specifies the RDM result file name. The default is standard out.

Example

In the /var/opt/SUNWps/https-servername/portal directory as root:

# /opt/SUNWps/lib/sendrdm -t 3600 -u /rdm/incoming rdmquery.soif result.soif

This example imports from a Compass Server 3.01x using /rdm/incoming as the uri with the timeout set to one hour. The content of rdmquery.soif is:



@RDMHEADER { -
catalog-service-id{48}: x-catalog://frankie.sesta.com:89/Compass-2

rdm-type{10}: rd-request
rdm-version{3}: 1.0
rdm-query-language{8}: gatherer
}
@RDMQUERY { -
scope{3}: all
}

StartRobot

The StartRobot script can be used by an administrator to start the robot manually. Usually this script is used by the scheduler to start the robot at set times (cron job). The StartRobot command is in the /var/opt/SUNWps/https-servername/portal directory.

Syntax

#  StartRobot

Options

There are no options.


Previous      Contents      Index      Next     
Copyright 2002-2003 Sun Microsystems, Inc. All rights reserved.