9.2.8 Using a backup script for backup and file copying for restoration
You can back up definition information for PFM - Web Console from the command line without stopping the service. By implementing this process as part of a batch process, you can operate a system in which backup is taken care of automatically.
- Organization of this subsection
(1) Prerequisites
You can use the backup command on hosts with PFM - Web Console installed.
(2) Collective backup using the backup command
The backup command allows you to collectively back up the definition information provided by PFM - Web Console without stopping the service. You can back up the information to a directory of your choice.
The backup command backs up the following information:
-
Definition information for the PFM - Web Console service
-
Bookmark information
-
Process monitoring template information
The following table describes the directory structure the backup command creates at the specified backup directory.
Directory structure |
Description |
---|---|
backup-directory |
A directory chosen by the operator, specified in the command line. |
backup-directory\jp1pcwcbackup |
Backup destination for PFM - Web Console service definition information, authentication key files, and bookmark information. |
backup-directory\jp1pcwcbackup\Backup_info_wc.txt |
PFM - Web Console configuration information file |
backup-directory\jp1pcwcbackup\jp1pcWebCon |
Backup destination for PFM - Web Console service definition information |
backup-directory\jp1pcwcbackup\jp1pcWebCon\CPSB |
Backup destination for PFM - Web Console service definition information (Web server settings files)#1 |
Service definition information in backup-directory\jp1pcwcbackup\jp1pcWebCon\CPSB\ |
PFM - Web Console service definition information (Web server settings files) |
backup-directory\jp1pcwcbackup\jp1pcWebCon\conf |
Backup destination for PFM - Web Console service definition information (PFM - Web Console settings files) |
Service definition information in backup-directory\jp1pcwcbackup\jp1pcWebCon\conf\ |
PFM - Web Console service definition information (PFM - Web Console settings files) |
backup-directory\jp1pcwcbackup\jp1pcWebCon\cmdkey |
Backup destination for authentication key files |
Authentication keys in backup-directory\jp1pcwcbackup\jp1pcWebCon\cmdkey\ |
Authentication key file (JPCCMDKEY)#2 |
backup-directory\jp1pcwcbackup\bookmarks |
Backup destination for bookmark information |
Bookmark information in backup-directory\jp1pcwcbackup\bookmarks\ |
Bookmark definition files (across several folders and files)#3 |
backup-directory\jp1pcwcbackup\processMonitoringTemplates |
Backup destination for process monitoring template information |
Process monitoring template information in backup-directory\jp1pcwcbackup\processMonitoringTemplates\ |
Process monitoring template files (across several folders and files)#3 |
backup-directory\info |
Storage location for maintenance information associated with backup process#4 |
In order to restore the data you backed up, the configuration of PFM - Web Console on the host must be the same as it was when the backup was taken.
The backup command outputs information about the PFM - Web Console configuration on the host to a file. You can check for consistency between the backup and restoration environments by viewing the contents of this file.
The following table provides an overview of PFM - Web Console configuration information file.
Item |
Description |
---|---|
File name |
Backup_info_wc.txt |
Output file path |
|
Contents |
The date and time of the backup, and configuration information for PFM - Web Console on the host. |
For details on the contents of the PFM - Web Console configuration information file (Backup_info_wc.txt), the format of each item, and the items you need to check, see Table 9-30 List of PFM - Web Console configuration items to be checked.
(a) Backup in a cluster environment
When you use a command to back up definition information in a cluster environment, the command is unable to access the logical host environment directory from the standby node. This means that some of the information that can be backed up from the executing host cannot be backed up from the standby host. The following table describes the differences between the executing and standby hosts in terms of the definition information that can be backed up.
Host in cluster system |
Definition information that can be backed up by the backup command |
||
---|---|---|---|
Physical host |
Shared disk |
||
Service definition information |
Bookmark information |
Process monitoring template information |
|
Executing host |
Y |
Y |
Y |
Standby host |
Y |
N |
N |
When you use the backup command on the standby node, the command does not collect definition information (bookmark information and process monitoring template information) from the shared disk. At this time, the message KAVJT6551-W is output notifying the operator that this part of the backup process has been skipped.
The following figure illustrates the backup process when the backup command is executed on the executing and standby hosts in a cluster system.
(3) Backup procedures
(a) Backup procedure in a non-cluster system
-
Log on to the host where PFM - Web Console is installed.
-
Navigate to the directory installation-folder\tools where the backup command file is located.
-
Back up the definition information by executing the jpcwbackup -d directory command as a user with Administrators or Backup Operators permission.
(b) Backup procedure in a cluster system
In a cluster system, the backup command must be executed on the executing host and the standby host. If a failover occurs before the backup process is completed, execute the command again on both hosts after the failover.
-
Log on to the executing host where PFM - Web Console is installed.
-
Navigate to the directory installation-folder\tools where the backup command file is located.
-
Back up the definition information by executing the jpcwbackup -d directory command as a user with Administrators or Backup Operators permission.
-
Log on to the standby host where PFM - Web Console is installed.
-
Navigate to the directory installation-folder\tools where the backup command file is located.
-
Back up the definition information by executing the jpcwbackup -d directory command as a user with Administrators or Backup Operators permission.
(4) Restoration procedure
In order to restore data from a backup, the configuration of PFM - Web Console on the host must be the same as it was when the backup was taken.
For each item in the PFM - Web Console configuration information (Backup_info_wc.txt), the table below describes the contents of each item and its output format. It also describes each item, and whether you need to check the item for consistency between the backup and restoration environments.
No. |
Content |
Output format |
Description and checking |
Must match |
---|---|---|---|---|
1 |
Date and time of command backup |
DateTime=date-and-time-of-command-execution |
The date and time when the backup command began executing, according to the time zone setting of the user who executed the command. The value of this item depends on the locale and operating system. Examples:
|
N |
2 |
Host name of machine with PFM - Web Console installed |
Hostname=host-name |
The host name of the machine on which PFM - Web Console is installed.
|
Y |
3 |
Path of PFM - Web Console installation directory |
InstallDirectory=installation-directory-path |
The folder where PFM - Web Console is installed, as an absolute path.
|
Y |
4 |
Installation |
PFM - Web ConsolePP-name:VV-RR-SS |
The PP name of the installed instance of PFM - Web Console, followed by the PP version in the format VV-RR-SS. For versions with no value for SS (such as 10-00), 00 is output for SS.
|
Y |
5 |
PFM - Web Console information |
bookmarkRepository=location-of-bookmark-definition-information |
The location of bookmark definition information, as the value of the bookmarkRepository parameter in the config.xml file. If the parameter is not specified in config.xml, bookmarkRepository= is output for this item.
|
N |
6 |
Location of bookmark definition information |
processMonitoringTemplatesRepository=location-of-process-monitoring-template-information |
The location of process monitoring template information, as the value of the processMonitoringTemplatesRepository parameter in the config.xml file. If the parameter is not specified in config.xml, processMonitoringTemplatesRepository= is output for this item.
|
N |
The following table lists the source and destination paths for restored data.
Data to be restored |
Backup file path of data to be restored# |
Restoration path |
|
---|---|---|---|
Result of checking Backup_info_wc.txt |
Path |
||
Service definition information |
D:\backup\jp1pcwcbackup\jp1pcWebCon |
-- |
installation-folder\ |
Bookmark information |
D:\backup\jp1pcwcbackup\bookmarks |
bookmarkRepository has no value |
installation-folder\bookmarks |
All other situations |
Path specified for bookmarkRepository in Backup_info_wc.txt |
||
Process monitoring template information |
D:\backup\jp1pcwcbackup\processMonitoringTemplates |
processMonitoringTemplatesRepository has no value |
installation-folder\processMonitoringTemplates |
All other situations |
Path specified for processMonitoringTemplatesRepository in Backup_info_wc.txt |
Data to be restored |
Backup file path of data to be restored# |
Restoration path |
|
---|---|---|---|
Result of checking Backup_info_wc.txt |
Path |
||
Service definition information |
/tmp/backup/jp1pcwcbackup/jp1pcWebCon |
-- |
/opt/jp1pcwebcon |
Bookmark information |
/tmp/backup/jp1pcwcbackup/bookmarks |
bookmarkRepository has no value |
/opt/jp1pcwebcon/bookmarks |
All other situations |
Path specified for bookmarkRepository in Backup_info_wc.txt |
||
Process monitoring template information |
/tmp/backup/jp1pcwcbackup/processMonitoringTemplates |
processMonitoringTemplatesRepository has no value |
/opt/jp1pcwebcon/processMonitoringTemplates |
All other situations |
Path specified for processMonitoringTemplatesRepository in Backup_info_wc.txt |
(a) Restoration procedure in a non-cluster environment
-
Check the PFM - Web Console configuration.
Make sure that the items in the PFM - Web Console configuration information file (Backup_info_wc.txt) in the backup data are the same as in the restoration environment.
- When checking bookmark definition information and process monitoring template definition information:
-
When there is no setting for bookmarkRepository or processMonitoringTemplatesRepository in the PFM - Web Console configuration information file (Backup_info_wc.txt), the default directory is used.
-
Log on to the PFM - Web Console host where you want to restore the data.
-
Stop the PFM - Web Console service on the host by executing the jpcwstop command.
-
Check the location of the backup files.
Make sure that backup files are available that were created on the same host.
-
Delete or move the data at the location where the backup data is to be restored.
- When restoring service definition information:
-
The restoration process will overwrite the initialization file (installation-folder\conf\config.xml). Keep a copy of the data if needed.
- When restoring bookmark definition information or process monitoring template definition information:
-
After the restoration process, the storage directories for bookmark information and process monitoring template information are those specified as the values of the bookmarkRepository and processMonitoringTemplatesRepository parameters in the PFM - Web Console configuration information file (Backup_info_wc.txt). These directories must be empty when you restore the data. Delete any data in these directories, or move the data to another location.
-
Restore the definition information.
Check the source and destination paths of the data being restored, and copy all of the files at the backup file path to the restoration destination, maintaining the directory structure.
-
Make sure that the settings in the initialization file (installation-folder\conf\config.xml) match the system environment at the restoration destination.
-
Start the PFM - Web Console service on the host by executing the jpcwstart command.
(b) Restoration procedure in a cluster environment
Restoration procedure on the executing host:
-
Check the PFM - Web Console configuration.
Make sure that the items in the PFM - Web Console configuration information file (Backup_info_wc.txt) in the backup data are the same as in the restoration environment.
-
Log on to the executing host where you want to restore the data.
-
Stop the PFM - Web Console service on the host by using the cluster software.
-
Check the location of the backup files.
- When restoring service definition information:
-
Make sure that backup files are available that were created on the same host.
- When restoring bookmark definition information or process monitoring template definition information:
-
Make sure that backup files are available that were created on the executing host.
Backup data taken while a host is operating as the standby host after a failover does not include bookmark definition information or process monitoring template information. This information is only collected from hosts operating as the executing host. For this reason, you must use backup data that was collected from an executing host (the physical host has no bearing).
-
Delete or move the data at the location where the data is to be restored.
- When restoring service definition information:
-
The restoration process will overwrite the initialization file (installation-folder\conf\config.xml). Keep a copy of the file if needed.
- When restoring bookmark definition information or process monitoring template definition information:
-
Delete or move the bookmark information and process monitoring template information present at the restore destination.
After the restoration process, the storage directories for bookmark information and process monitoring template information are those specified as the values of the bookmarkRepository and processMonitoringTemplatesRepository parameters in the PFM - Web Console configuration information file (Backup_info_wc.txt). These directories must be empty when you restore the data. Delete any data in these directories, or move the data to another location.
-
Restore the definition information.
Check the source and destination paths of the data being restored, and copy all of the files at the backup file path to the restoration destination, maintaining the directory structure.
-
Make sure that the settings in the initialization file (installation-folder\conf\config.xml) match the system environment at the restoration destination.
-
Start the PFM - Web Console service on the host using the cluster software.
Restoration procedure on the standby host:
-
Check the PFM - Web Console configuration.
Make sure that the items in the PFM - Web Console configuration information file (Backup_info_wc.txt) in the backup data are the same as in the restoration environment.
-
Log on to the standby host where you want to restore the data.
-
Stop the PFM - Web Console service on the host by using the cluster software.
-
Check the location of the backup files.
- When restoring service definition information:
-
Make sure that backup files are available that were created on the same host.
- Note:
-
Because the standby host cannot access the shared disk, you cannot restore bookmark definition information and process monitoring template information on a standby host.
-
Delete or move the data at the location where the data is to be restored.
- When restoring service definition information:
-
The restoration process will overwrite the initialization file (installation-folder\conf\config.xml). Keep a copy of the file if needed.
-
Restore the definition information.
Check the source and destination paths of the data being restored, and copy all of the files at the backup file path to the restoration destination, maintaining the directory structure.
-
Make sure that the settings in the initialization file (installation-folder\conf\config.xml) match the system environment at the restoration destination.
-
Start the PFM - Web Console service on the host using the cluster software.