Hitachi

JP1 Version 12 JP1/Performance Management Reference


jpctool db backup

Organization of this page

Format

jpctool db backup   -id service-ID
                   [-host host-name]
                   [-lhost logical-host-name]
                   [-d directory]
                   [-partial startday,endday[,[dbid]
                       [,[recname][,[drawer]]]]]
                   [-direct]
                   [-alone]

Function

The jpctool db backup command creates a backup file of the data stored in the Master Store, Agent Store, or Remote Monitor Store service database.

The default execution of this command creates the following files:

For full backup

#1

Generation numbers are assigned sequentially beginning with 01. The maximum generation number is the value specified in Backup Save in the jpcsto.ini file. The default maximum generation number is 05. However, when you directly specify the backup directory, directories with generation numbers are not created. The backup data is written under the specified directory.

#2

The following are the specifiable database IDs:

  • PI: PI record-type Agent Store and Remote Monitor Store service database

  • PD: PD record-type Agent Store and Remote Monitor Store service database

  • PL: PL record-type Agent Store and Remote Monitor Store service database

  • PA: Master Store service database

#3

xxxx denotes the service key of a PFM - Agent or PFM - RM. For details about the service key, see the naming rules described in the appendix of the JP1/Performance Management Planning and Configuration Guide.

#4

A directory with instance names is for a PFM - Agent or PFM - RM that monitors an application program that can start a set of multiple services at the same host.

#5

Either [001] or [002] is assigned.

#6

The record-name item indicates PI_LOGD, PD_PDI, PL_MESS, or other Agent record name.

For partial backup (Store version 2.0 only)

#1

xxxx denotes the service key of a PFM - Agent or PFM - RM. For details about the service key, see the naming rules described in the appendix of the JP1/Performance Management Planning and Configuration Guide.

#2

A directory with instance names is for a PFM - Agent or PFM - RM that monitors an application program that can start a set of multiple services at the same host.

#3

Either [001] or [002] is assigned.

#4

The record-name item indicates PI_LOGD, PD_PDI, PL_MESS, or other Agent record name.

Hosts that can execute the command

#

The command can be executed only when the -alone or -direct option is specified.

Execution permission

In Windows:
  • User with Administrators permissions

  • User with Backup Operators permission

In UNIX:

User with root user permissions

Installation directory

In Windows:
installation-folder\tools\
In UNIX:
/opt/jp1pc/tools/

Arguments

-id service-ID

Specifies the service ID (whose second character is S) of the Master Store, Agent Store, or Remote Monitor Store service. For service-ID, specify a string of 1 to 258 bytes.

You can use a wildcard character to specify multiple service IDs. Note, however, that when you specify the -d option, you cannot use a wildcard character. When multiple service IDs are specified, if a service results in an error, processing continues for the other services. If errors occur on multiple services, the command returns a value for the last error that occurred.

-host host-name

Specifies a host name if data is to be backed up from a specific host. For host-name, specify a string of 1 to 32 bytes, consisting of alphanumeric characters with no space characters. If you omit this option, the local host is assumed.

You can use a wildcard character to specify multiple host names.

When you specify multiple host names, the wildcard character * represents any character string consisting of at least one character and ? represents any single character. Note, however, that when you specify the -d option, you cannot use a wildcard character.

-lhost logical-host-name

Specifies a logical host name if this command is to be executed by a host in a logical host environment, not in the physical host environment. For logical-host-name, specify a string of 1 to 32 bytes, consisting of alphanumeric characters with no space characters. If you omit this specification, the physical host is assumed. Wildcard characters cannot be used.

-d directory

Specifies the backup destination directory. Specify a directory that can be accessed with the following permission:

  • In Windows: System account

  • In UNIX: Root user permission

For the directory when the Store version is 1.0, use a maximum of 127 bytes to specify the full path or a relative path. When the Store version is 2.0, use a maximum of 214 bytes to specify the full path or a relative path. When a relative path is specified, it must be within 214 bytes even when converted to an absolute path. When you specify a relative path, the base directory is the environment directory of the specified Store service.

To use this option, only one Store service on the local host can be specified. Therefore, you cannot use wildcard characters for service-ID and host-name. Unlike using the BackupDir label of the jpcsto.ini file to specify a backup directory, directories with generation numbers are not created. Backup data is written under the specified directory.

Any existing file in the specified directory will be overwritten.

-partial startday,endday[,[dbid][,[recname][,[drawer]]]]

Executes partial backup only when the Store version of the specified Store service is 2.0.

startday: Specifies the start day for the backup data as a number of days before the current date in local time.

endday: Specifies the end day for the backup data as a number of days before the current date in local time.

dbid: Specifies the database ID. When this item is omitted, all the databases are selected.

recname: Specifies the record type. When this item is omitted, all record types are selected.

drawer: Specifies the summary type. The table below describes the values that can be specified only when PI is specified as dbid. When this item is omitted, all summary types are selected. When this item is omitted, directories 1 to 6 are created under the STP1 directory. In addition, when drawer is specified without dbid being specified, the drawer setting becomes invalid.

Specifiable value

Description

Storage directory

Minute

Specifies a minute-by-minute record.

backup-directory#/STPI/1

Hour

Specifies a hourly record.

backup-directory#/STPI/2

Day

Specifies a daily record.

backup-directory#/STPI/3

Week

Specifies a weekly record.

backup-directory#/STPI/4

Month

Specifies a monthly record.

backup-directory#/STPI/5

Year

Specifies a yearly record.

backup-directory#/STPI/6

#

One of the following backup directories is used:

- The directory specified with the -d <directory> option

- The partial backup directory displayed with the jpcconf db define -key agtX command.

For an example of how to specify the -partial option, see the section describing the partial backup of performance data in the JP1/Performance Management User's Guide.

-direct

Specifies that backup processing be executed on the database for the Master Store, Agent Store, or Remote Monitor Store service. When this option is specified, the command can be executed on a PFM - Agent or PFM - RM host (other than the PFM - Manager host). However, the Name Server and Master Manager services must be running. Additionally, the host where the command is executed must be able to communicate directly with the target Store service.

This option cannot be specified together with the -alone option.

-alone

Specifies that backup processing on the Master Store, Agent Store, or Remote Monitor Store service database is to be executed on the local host. The command cannot execute backup processing on the Master Store, Agent Store, or Remote Monitor Store service database located at a remote host. When this option is specified, the command can execute backup processing even if PFM - Manager is not running. The command can be executed at a PFM - Agent or PFM - RM host (other than the PFM - Manager host).

This option cannot be specified together with the -host or -direct option.

Disk space required to execute this command

This command creates a temporary file during execution. For the amount of disk space that is required to execute this command, see the appendix in the JP1/Performance Management Planning and Configuration Guide.

About deletion of unnecessary backup data

The following describes which directories and files you can delete when deleting backup data that is no longer needed.

Note that the following description applies in an environment in which backup data is saved in the system-managed backup directory for the Store database (that is, the -d option is not specified). In an environment in which backup data is saved in a user directory (specified by the -d option), all backup data, including that directory, can be deleted.

For full backup:

Partial backup (available only when the Store version is 2.0)

Notes

Return values

0

The command terminated normally.

1

An argument specification is invalid.

2

The user does not have execution permission for the command.

3

One or more of the specified services is not active.

5

PFM - Manager has not been installed.

7

The specified service ID does not belong to an Agent Store service, Remote Monitor Store service, or Master Store service.

12

At least one of the specified services does not support the function (when the -partial or -d option has been specified).

100

The Performance Management environment is invalid.

101

The Name Server service, Master Manager service, Master Store service, or the operation target service is not active.

102

The specified logical host name has not been set up.

104

The specified Master Store, Agent Store, or Remote Monitor Store service is engaged in backup or export processing.

200

A memory shortage occurred.

210

A disk space shortage occurred.

211

A backup file or directory cannot be accessed.

220

A host name specified in the service configuration information file is invalid.

222

A communication error occurred.

223

A communication processing timeout error occurred.

255

An unexpected error occurred.

Usage example 1

This example backs up all data from the host02 host:

jpctool db backup -id ?S* -host host02

Usage example 2

This example backs up all data from the agt01 host in a logical host environment (host name: jp1-ha1):

jpctool db backup -id ?S* -host agt01 -lhost jp1-ha1

Usage example 3

The following examples execute the command with -alone and -direct specified at the lhost02 host in the logical environment in PFM - Agent for Platform (Windows):

jpctool db backup -id OS* -lhost lhost02  -alone
 
jpctool db backup -id OS* -lhost lhost02  -direct

Usage example 4

This example backs up the data of all Agent Store and Remote Monitor Store services on the jp1-ha1 logical host when PFM - Agent or PFM - RM is in a logical host environment (host name: jp1-ha1) and PFM - Manager is on the physical host:

jpctool db backup -id "?S*" -host jp1-ha1

Usage example 5

This example backs up the data of all Agent Store and Remote Monitor Store services on the jp1-ha1 logical host when PFM - Agent or PFM - RM is on a logical host (host name: jp1-ha1) and PFM - Manager is on a logical host (host name: jp1-ha2):

jpctool db backup -id "?S*" -host jp1-ha1 -lhost jp1-ha2