Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Portal Server 6 2005Q1 Technical Reference Guide 

Chapter 15
rdmgr

This chapter contains the following sections:


Description

The rdmgr command is the main command used to work with the Search service. It gives the administrator 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 Sun Java System 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 the servername is the default Portal Server instance name--the fully qualified name of your Portal Server.


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 an administrator 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.

Subcommands

The following table lists the subcommand in the first column with a brief description in the second column.

-d

Delete RDs.

-g

Retrieve RDs filtered by a view.

-m

Merge RDs filtered by a view.

-n

Count the RDs

-u

Insert or replace RDs. This subcommand is the default subcommand if none is stated.

-U

Dump database in SOIF to stdout.

-L

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


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.


Syntax

rdmgr [-u|m|g|d|n|U|L] [-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

The following is a two-column table that lists the options or arguments in the first column with a brief description in the second column. The following options are supported:

-A

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

-C

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

-S

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

-T

Operate 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

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.

-P

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.

-q

Delete 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

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

-c search.conf

Specify 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

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

Set 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

Use with the progress option. A report is generated every number of RDs. The default is 500. 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

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

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

The query is any regular search query.

Examples

Example 1    

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

Set environment variable LD_LIBRARY_PATH to /opt/SUNWps/lib. In the /var/opt/SUNWps/https-sesta.com/portal directory, type:

PortalServer-base/bin/rdmgr -U

Example 2    

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

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

PortalServer-base/bin/rdmgr -d -Q java

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.

Subcommands

The following table is a two-column table that lists the subcommand in the first column with a brief description in the second column.

-O

Optimize 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

Truncate or empty 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

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

-E

Delete 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

Recover 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

Repartition the database. This command takes no options. The partitions are defined in the config/search.conf file labeled database-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

The following is a two-column table that lists the options or arguments in the first column with a brief description of the corresponding option in the second column. The following options are supported:

-A

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

-S

Disable schema checking. Use with the I subcommand.

-T

Operate 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

Update the database only; do not update the index. Use with E and X subcommands.

-V

Update the index only; do not update the database. Use with E and X subcommands.

-N

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

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 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

Set the indexing batch size to this number of RDs. Use with the I subcommand.

-c search.conf

Specify 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

Set 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

Use with the progress option. A report is generated every number of RDs. The default is 500. 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 following 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.

In the default search directory, type:

PortalServer-base/bin/rdmgr -E -j 13 -p stdout -r 5

Example 2    

The following example shows how to recover 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.

If the Search engine is ‘hung’ or not responding, in the default search directory, type:

PortalServer-base/bin/rdmgr -R

Usage Message and Version Subcommands

Description

These subcommands can be used to display the usage message and view the version information.

Options

The following table lists the subcommands in the first column and a brief description of the corresponding subcommand in the second column.

-h or -?

Show the usage message.

-v

Show version information


Return Codes

The rdmgr command returns the following return codes to the shell.

0

Success

1

Failure



Previous      Contents      Index      Next     


Part No: 817-7696.   Copyright 2005 Sun Microsystems, Inc. All rights reserved.