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
-
When backing up the data stored in the Master Store service database
-
Windows: installation-folder\mgr\store\backup\generation-number#1\database-ID#2.DB
-
UNIX: /opt/jp1pc/mgr/store/backup/generation-number#1/database-ID#2.DB
-
-
When backing up the data stored in the Agent Store service database when Store version 1.0 is used
-
Windows: installation-folder\xxxx#3\store[\instance-name]#4\backup\generation-number#1\database-ID#2.DB
-
UNIX: /opt/jp1pc/xxxx#3/store[/instance-name]#4/backup/generation-number#1/database-ID#2.DB
-
-
When backing up the data stored in the Agent Store and Remote Monitor Store service database when Store version 2.0 is used
-
Windows: Under installation-folder\xxxx#3\store[\instance-name]#4\backup\generation-number#1, the following backup files are created:
• STPI\summary-separator\year\month-day\generation-number#5\record-name.DB#6
• STPI\summary-separator\year\month-day\generation-number#5\record-name.IDX#6
• STPD\year\month-day\generation-number#5\record-name.DB#6
• STPD\year\month-day\generation-number#5\record-name.IDX#6
• STPL\year\month-day\generation-number#5\record-name.DB#6
• STPL\year\month-day\generation-number#5\record-name.IDX#6
• STAM.DB
• STAM.IDX
• STDC.DB
• STDC.IDX
• STDM.DB
• STDM.IDX
• STPA.DB
• STPA.IDX
• STPH.DB
• STPH.IDX
• STPT.DB
• STPT.IDX
• jpcsto.ini
• STDICT.DAT
• STRULES.DAT
-
UNIX: Under /opt/jp1pc/xxxx#3/store[/instance-name]#4/backup/generation-number#1, the following backup files are created:
• STPI/summary-separator/year/month-day/generation-number#5/record-name.DB#6
• STPI/summary-separator/year/month-day/generation-number#5/record-name.IDX#6
• STPD/year/month-day/generation-number#5/record-name.DB#6
• STPD/year/month-day/generation-number#5/record-name.IDX#6
• STPL/year/month-day/generation-number#5/record-name.DB#6
• STPL/year/month-day/generation-number#5/record-name.IDX#6
• STAM.DB
• STAM.IDX
• STDC.DB
• STDC.IDX
• STDM.DB
• STDM.IDX
• STPA.DB
• STPA.IDX
• STPH.DB
• STPH.IDX
• STPT.DB
• STPT.IDX
• jpcsto.ini
• STDICT.DAT
• STRULES.DAT
-
- #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)
-
When backing up a part of the data stored in the Agent Store and Remote Monitor Store service database
Backup files are created according to the records being collected and the -partial option specification.
-
Windows: Under installation-folder\xxxx#1\store\instance-name#2\partial, the following backup files are created:
• STPI\summary-separator\year\month-day\generation-number#3\record-name.DB#4
• STPI\summary-separator\year\month-day\generation-number#3\record-name.IDX#4
• STPD\year\month-day\generation-number#3\record-name.DB#4
• STPD\year\month-day\generation-number#3\record-name.IDX#4
• STPL\year\month-day\generation-number#3\record-name.DB#4
• STPL\year\month-day\generation-number#3\record-name.IDX#4
• STAM.DB
• STAM.IDX
• STDC.DB
• STDC.IDX
• STDM.DB
• STDM.IDX
• STPA.DB
• STPA.IDX
• STPH.DB
• STPH.IDX
• STPT.DB
• STPT.IDX
• jpcsto.ini
• STDICT.DAT
• STRULES.DAT
-
UNIX: Under /opt/jp1pc/xxxx#1/store/instance-name#2/partial, the following backup files are created:
• STPI/summary-separator/year/month-day/generation-number#3/record-name.DB#4
• STPI/summary-separator/year/month-day/generation-number#3/record-name.IDX#4
• STPD/year/month-day/generation-number#3/record-name.DB#4
• STPD/year/month-day/generation-number#3/record-name.IDX#4
• STPL/year/month-day/generation-number#3/record-name.DB#4
• STPL/year/month-day/generation-number#3/record-name.IDX#4
• STAM.DB
• STAM.IDX
• STDC.DB
• STDC.IDX
• STDM.DB
• STDM.IDX
• STPA.DB
• STPA.IDX
• STPH.DB
• STPH.IDX
• STPT.DB
• STPT.IDX
• jpcsto.ini
• STDICT.DAT
• STRULES.DAT
-
- #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
-
PFM - Manager
-
PFM - Agent#
-
PFM - RM#
- #
-
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 |
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:
-
Master Store service backup data that can be deleted
-
Windows: Folders and files under installation-folder\mgr\store\backup\generation-number\
-
UNIX: Directories and files under /opt/jp1pc/mgr/store/backup/generation-number/
-
-
Agent Store service backup data that can be deleted if the Store version is 1.0
Note that this description assumes that the Store database's default backup directory that was set initially has not been changed. If the default backup directory has been changed by using the jpcconf db define command, replace the path before the backup directory with the path of the new default backup directory.
-
Windows: Folders and files under installation-folder\service-key\store[\instance-name]\backup\generation-number\
-
UNIX: Directories and files under /opt/jp1pc/service-key/store[/instance-name]/backup/generation-number/
-
-
Agent Store and Remote Monitor Store service backup data that can be deleted if the Store version is 2.0
Note that this description assumes that the Store database's default backup directory that was set initially has not been changed. If the default backup directory has been changed by using the jpcconf db define command, replace the path before the backup directory with the path of the new default backup directory.
-
Windows: Folders and files under installation-folder\service-key\store[\instance-name]\backup\generation-number\
-
UNIX: Directories and files under /opt/jp1pc/service-key/store[/instance-name]/backup/generation-number/
-
Partial backup (available only when the Store version is 2.0)
-
Agent Store and Remote Monitor Store services backup data that can be deleted
Note that this description assumes that the Store database's default backup directory that was set initially has not been changed. If the default backup directory has been changed by using the jpcconf db define command, replace the path before the partial directory with the path of the new default backup directory.
-
Windows: Folders and files under installation-folder\service-key\store[\instance-name]\partial\
-
UNIX: Directories and files under /opt/jp1pc/service-key/store[/instance-name]/partial/
-
Notes
-
Arguments must be specified in the order that they appear in the description. Otherwise, they will not be recognized correctly.
-
This command cannot be executed in the following cases:
-
The Name Server service, Master Manager service, or the specified Master Store service, Agent Store, or Remote Monitor Store service is stopped.
-
The data in the database of the specified Master Store, Agent Store, or Remote Monitor Store service is currently being backed up.
-
The data in the database of the specified Master Store, Agent Store, or Remote Monitor Store service is currently being exported.
-
-
If you execute multiple instances of the jpctool db backup or jpctool db dump command on separate hosts concurrently, make sure that you specify the -direct or -alone option. To execute backup or export processing more than once, make sure that the current command's processing is completed before executing the next command.
If you execute the jpctool db backup command without specifying the -direct or -alone option, do so on a single host, rather than on multiple hosts.
-
When you specify service-ID (for the -id option) or host-name (for the -host option) in the jpctool db backup command, you can use wildcard characters. You can execute backup or export processing concurrently on multiple agents by using wildcard characters in the service-ID or -host option.
- Example: Execute the jpctool db backup command on multiple agents
-
This example creates a backup file for all agents on PFM - Agent for Platform (Windows):
jpctool db backup -id "TS*" -host "*"
-
If the volume of data to be backed up is large, backup processing may take some time.
-
A historical report cannot be displayed in PFM - Web Console for an Agent Store or Remote Monitor Store service while it is being backed up. Request display of the historical report again after backup processing is completed.
-
If command execution is interrupted by pressing the Ctrl + C keys or by a signal, a predefined return value is not returned. Therefore, you should ignore the return value when the command was interrupted by the Ctrl + C keys or by a signal.
-
When you use the -d option to specify a backup directory, do not use the same backup directory for different service keys or different instances, and do not specify the import directory. If you do so, the backup data may be damaged.
-
Before you execute this command on a PFM - Agent or PFM - RM host, check whether the option for restricting remote operation from Agent hosts is enabled on the PFM - Manager host. If that option is enabled, you can back up only data on the local host. If you specify a remote host by using the -host option, the command fails.
-
An attempt to execute the jpctool db backup command for the Master Store, Agent Store, or Remote Monitor Store service might fail while one of the following commands and operations is being processed for that service:
-
jpctool db backup
-
jpctool db dump
-
jpctool db clear
-
jpctool db import
-
jpctool db restore
-
Operation to store data of the Agent Store service or the Remote Monitor Store service
-
Operation to display a historical report
If the jpctool db backup command fails in the above situation, re-execute the command.
-
-
This command cannot be executed between hosts that use different types of the Internet protocol.
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