Sun Java System Portal Server 7 Command-Line Reference

Chapter 4 Management Subcommands

This chapter describes the folllowing subcommands:

psadmin list-portals

Description

Produces a list of all portals and Portal Server instances that are available.

Syntax

Long Format

psadmin list-portals --adminuser uid --passwordfile password-file [--portal portal-name]

Short Format

psadmin list-portals -u uid -f password-filename [-p portal-name]

Options

The following options are required:

[--adminuser| -u uid

Specifies the administrator's distinguished name (dn) or user ID (uid).

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

The following option is optional:

[--portal | -p] portal-name

Include to display Portal Server instances for the portal specified. Omit to display Portal Server instances for all portals.

psadmin create-portal

Description

Sets up a new portal, registers it within the administration framework, and creates the portal's first Portal Server instance.

Syntax

Long Format

psadmin create-portal --adminuser uid --passwordfile password-file --portal portal-name --webconfig web-config-file --uri portal-uri

Short Format

psadmin create-portal -u uid -f password-filename -p portal-name -w web-config-file --uri portal-uri

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name (dn), or user ID (uid).

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

[--portal | -p] portal-name

Specifies the name of the new portal.

[--webconfig | -w] web-config-file

Specifies the name of the web container properties file, which contains web container-specific configuration parameters. This properties file is in the /opt/SUNWportal/template directory for your platform.

--uri portal-uri

Specifies the uniform resource indicator (URI) where the portal web is deployed.

psadmin delete-portal

Description

Removes a portal from the administration framework and deletes all portal server instances and file system data associated with the portal. Undeploys the portal web application and portlet web applications deployed on the web container instances.

Syntax

Long Format

psadmin delete-portal --adminuser uid --passwordfile password-filename --portal portal-name

Short Format

psadmin delete-portal -u uid -f password-file -p portal-name

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name (dn) or user ID (uid).

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

[--portal | -p] portal-name

Specifies the name of the portal to remove.

See also psadmin list-portals

psadmin create-instance

Description

Sets up a new Portal Server instance and associates it with a portal.

Syntax

Long Format

psadmin create-instance --adminuser uid --passwordfile password-file --portal portal-name --webconfig web-config-file[--instance-name instance-name]

Short Format

psadmin create-instance -u uid -f password-filename -p portal-name -w web-config-file[-i instance-name]

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name (dn) or user ID (uid).

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

[--portal | -p] portal-name

Specifies the name of the portal that the instance belongs to.

[--webconfig | -w] web-config-file

Specifies the name of the web container properties file, which contains web container-specific configuration parameters. This properties file is in the /opt/SUNWportal/template directory for your platform.

The following option is optional:

[--instance | -i] intance-name

Specifies the name of the new portal instance. If omitted, the administration framework generates the name as host-name_port-number.

psadmin delete-instance

Description

Removes a Portal Server instance from the portal, configures the web container to remove the instance entry, including undeploying the Portal WAR.

Syntax

Long Format

psadmin delete-instance --adminuser uid --passwordfile password-filename --portal portal-name --instance instance-name

Short Format

psadmin delete-instance -u uid -f password-filename -p portal-name -i instance-name

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name (dn), or user ID (uid).

[--passwordFile | -f] password-filename

Specifies the administrator's password in the password file.

[--instance | -i] instance-name

Specifies the name of the instance to remove.

[--portal | -p] portal-name

Specifies the name of the portal that the instance belongs to.

psadmin redeploy

Description

Redeploys a Portal Server to a web container instance. if there's more than one Portal Server instance, this command will deploy the Portal application to all instances. If --allwebapps option is given, this command will re-deploy all web apps which are deployed with the Poral Server web app in the same web container instance.

Syntax

Long Format

psadmin redeploy --adminuser uid --passwordfile password-filename --portal portal-name [--allwebapps]

Short Format

psadmin redeploy -u uid -f password-filename -p portal-name -W

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name (dn), or user ID (uid).

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

[--portal | -p] portal-name

Specifies the name of the portal that the instance belongs to.

The following option is optional:

[--allwebapps | -W]

Use of this flag will cause the web container to redeploy all web applications that were deployed for the Portal. It is recommended that this operation is done during off hours or non-production time. Also, depending on the number of web applications, it might take a while to complete the redeployment.

psadmin export

Description

Exports the portal desktop, including the provider and channels, data.

Syntax

Long Format

psadmin export --adminuser uid --passwordfile password-filename [--files-only] --portal portal-name [--dp-only] --type type [--dn dn] [--global] [--exportfile export_file_list] [--debug] par-filename

Short Format

psadmin export -u uid -f password-filename [--files-only] -p portal-name [--dp-only] -t type [-d dn] [-g] [-x export_file_list] par-filename

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name (dn) or user ID (uid). Enclose value in double quotation marks if it includes spaces.

[--passwordfile | -f] password-filename

Specifies administrator's password in the password file.

[--portal | -p] portal-name

Specifies the portal name.

[--type | -t] type

Specifies the type of data to be exported. Supports two types: desktop and provider. Note that the provider type must be used for channel as well as provider data.

The following argument is required:

par-filename

Specifies the name of the PAR file, located in the local host. If a PAR file with this name already exists, an error message is displayed. See also PAR File Format.

The following options are optional:

--files-only

Specifies to back up the desktop file system data only. Default is off.

--debug

This flag is used for debugging purpose only, set this flag to true to see exceptions that caused the error. Default is off.

--dp-only

Specifies to export the display profile data only. Default is off.

--export | -x export_file_list

Specifies a comma separated list of export files. Applicable only if type is provider which is used for exporting provider and/or channels data as specified in the export file. Each export file is a text file (.txt), corresponds to an entry (provider, channel, or provider/channel combination) in the .par file, and specifies the data to be inserted into the specified .par file. See Chapter 20, PAR Export File Format for more information.

--dn | -d dn

Specifies the distinguished node from where data is to be exported. Applicable only if type is provider. This option is mutually exclusive to --global.

--global | -g

Specifies the global level node to access the display profile document. Applicable only if type is provider. This option is mutually exclusive to --dn.

Example

psadmin export -u amadmin --passwordfile /tmp/passwd -t desktop desktop.par

psadmin export -u amadmin --passwordfile /tmp/passwd -t provider -d "ou=DeveloperSample,dc=someplace,dc=siroe,dc=com" -x expfile1.txt,expfile2.txt desktop.par

psadmin import

Description

Imports portal data. The import subcommand requires an archive file (PAR file) in the local system.

Syntax

Long Format

psadmin import --adminuser uid --passwordfile password-filename [--files-only] --portal portal-name [--continue] [--dp-only] [--overwrite] [--dpnode dpnode] [--redeploy] [--operations operations-list] [--debug] par-filename

Short Format

psadmin import -u uid -f password-filename [--files-only] -p portal-name [-c] [--overwrite] [--dp-only] [--dpnode dpnode] [-D] [-O operations-list] par-filename

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name (dn) or user ID (uid).

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

[--portal | -p] portal-name

Specifies the portal name.

The following argument is required:

par-filename

Specifies the name of the PAR file, which is located in the local host.

The following options are optional:

--files-only

Specifies to desktop file system data only. Default is off.

[--continue | -c]

Specifies that the import process should continue if errors indicate that the storage structure of the archive file and the current system differ. Default is false.

--debug

This flag is used for debugging purpose only, set this flag to true to see exceptions that caused the error. Default is off.

--dp-only

Specifies to import display profile data only. Default is off.

--overwrite

Specifies whether to overwrite the display profile document and file system files, if data already exists. Default is false.

If true, the data profile document is stored in the LDAP tree, replacing the original version, and file system data are overwritten. If false, the data profile document is combined with the data profile in the LDAP tree. File system data are not overwritten, if the same named file exists.

--dpnode dpnode

Specifies the base dn for the display profiles and service attributes to be imported. If the base dn is not specified, the display profile node defined inside the PAR file is used. If the PAR file does not provide a definition, the portal's default organization dn is used.

[--redeploy | -D]

Specifies whether to redeploy the Portal Server instances. By default, this is set to false.


Note –

Use of this flag will cause the web container to redeploy all web applications that were deployed for the Portal. It is recommended that this operation is done during off hours or during non-production time.


[--operations | -O operations-list]

Specifies a space separated list of operations where each operation constitutes of | (pipe) separated list of keywords that can have values most of which are optional. This option is applicable only when the imported PAR file is of type provider. The operations list is in the following format:

"dpnode=dn|entry=name|provider[=name]|channel[=name]|
container=name[|avail=name|selected]"
"dpnode=dn|entry=name|provider[=name]|channel[=name]|
container=name[|avail=name|selected]"

If this option is not specified, the operations as specified in PS-AutoExtract entry in PAR file is used for import. For more information on the operations format, see Chapter 21, Import Operations Format for more information.

Example

psadmin import -u amadmin --passwordfile /tmp/passwd dp_org.par

psadmin import -u amadmin --passwordfile /tmp/passwd --dpnode "ou=DeveloperSample,dc=someplace,dc=siroe,dc=com" -O ' "entry=mychannel|channel=anothername|avail=topcontainer" "entry=yourchannel|channel=anothername|avail=topcontainer" ' dp_providers.par

psadmin list-par

Description

Used to describe a PAR file. The list-par subcommand requires a PAR file located in the local system. If none of the optional options are specified (see Options for more information), the list-par subcommand lists all the directories as specified in PAR file manifest.

Syntax

Long Format

psadmin list-par --adminuser uid --passwordfile passwordFile --portal portal-name [--pbfiles-only] [--dp-only] [--war-only] [--static-only] par-filename

Short Format

psadmin list-par -u uid -f passwordFile -p portal-name [--pbfiles-only] [--dp-only] [--war-only] [--static-only] par-filename

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name (dn) or user ID (uid).

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

[--portal | -p] portal-name

Specifies the portal name.

The following argument is required:

par-filename

Specifies the name of the PAR file, which is located in the local host.

The following options are optional:

--pbfiles-only

Specifies if only pbfiles directory is to be listed. By default, this is turned off.

--war-only

Specifies if only WAR directory is to be listed. By default, this is turned off.

--dp-only

Specifies if only dp directory is to be listed. By default, this is turned off.

--static-only

Specifies if only static directory is to be listed. By default, this is turned off.

psadmin create-par

Description

Creates a PAR file from a file system directory which contains the PAR file structure and data files.

Synopsis

Long Format

create-par --dir par_src_dir [--debug] par-file

Short Format

create-par -I par-src-dir [--debug] par-file

Options

The following option is required:

--dir | -I par-src-dir

A fully qualified file system directory which contains the PAR file source.

The following option is optional:

--debug

This flag is used for debugging purpose only, set this flag to true to see exceptions that caused the error. By default, this is set to false.

Operands

The following operand is supported:

par-file

Specifies the PAR file to be created. The file must have the extension .par. If the PAR file already exists, it will be overwritten by the new file. See also PAR File Format.

psadmin schedule-tasks

Description

Designates commands to be run at specified time.

Syntax

Long Format

psadmin schedule-tasks --adminuser uid --passwordfile password-filename --commandfile command-file

Short Format

psadmin schedule-tasks -u uid -f password-filename --commandfile command-file

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name (dn) or user ID (uid).

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

The following options are optional:

--commandfile command-file

Specifies the full path of the command file that designates the names and execution schedules of commands.

The command format is command -options | day_of_week@hour:minute;day_of_week@hour:minute. For day_of_week, valid values are 0 for Sunday through 6 for Saturday. For hour, valid values are 0 through 23. For minute, valid values are 0 through 59.

Example

psadmin schedule-tasks-a amadmin --passwordfile /tmp/passwd --commandfile file1

with the content of the file1 file as:

./psadmin export -u amadmin -f /tmp/password dp_org.par | 1@23:30 ;

psadmin unschedule-tasks

Description

Cancels commands that are designated to run.

Syntax

Long Format

psadmin unschedule-tasks --adminuser uid --passwordfile password-filename --commandfile command-file

Short Format

psadmin unschedule-tasks -u uid -f password-filename --commandfile command-file

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name (dn) or user ID (uid).

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

The following option is optional:

--commandfile command-file

Specifies the full path of the command file that designates the names and execution schedules of commands.

The command format is command -options | day_of_week@hour:minute;day_of_week@hour:minute. For day_of_week, valid values are 0 for Sunday through 6 for Saturday. For hour, valid values are 0 through 23. For minute, valid values are 0 through 59.

Example

psadmin unschedule-tasks-u amadmin --passwordfile /tmp/passwd --commandfile file1

with the content of the file1 file as:

./psadmin export -u amadmin -f /tmp/password dp_org.par | 1@23:30 ;

psadmin set-domain-repository-password

Description

Sets the password used by the Portal Administration Server instance to log into the portal domain repository.

Syntax

Long Format

psadmin set-domain-repository-password --adminuser uid --passwordfile password-filename domainRepositoryPasswordFile

Short Format

psadmin set-domain-repository-password -u uid -f password-filename domainRepositoryPasswordFile

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name (dn) or user ID (uid).

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

The following argument is required:

domainRepositoryPasswordFile

Specifies the file that contains the portal domain repository password.

psadmin version

Description

Provides Portal Server version information.

Syntax

Long Format

psadmin --version --adminuser uid --passwordfile password-filename [--display] [--patches] [--jar jar-file-name] [--verbose]

Short Format

psadmin -V -u uid -f password-filename [--display] [--patches] [--jar jar-file-name] [-v]

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name (dn) or user ID (uid).

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

The following options are optional:

--display

Specifies whether to display the portal's version information. Default is true.

--patches

Specifies whether to list Portal Server patch information. Default is false.

--jar jar-file-name

Specifies whether to display the JAR file's version information.

[--verbose | -v]

Lists Portal Server patch information verbosely. By default, this is off.