17.17 recreatelogdb (recreating an operation log index on the site server)
This section describes the recreatelogdb command, which re-creates indexes to view the operation logs stored on the site server.
Functionality
This command re-creates indexes to be used for referring to the operation logs stored on the site server. It also reports the list of agent-operated logs managed by the site server up onto the management server.
Indexes are created on each site server and reported to the management server. When viewing the distributed operation logs from the operation window, the operation logs are searched through using the index information and thus the logs on the site server can be reached.
Operation logs stored on the site server cannot be viewed correctly if an inconsistency is introduced between the operation log data and the indexes on the site server due to the operation log data being manually added or removed, or if index information is corrupted due to a system failure. In such cases, you can use the recreatelogdb command. An operation log index will be re-created and the operation logs on the site server will be properly referred to.
Execute the recreatelogdb command in cases like the following:
-
When operation log data is deleted from its own storage folder on the site server
-
When backup data for the operation log is restored (added) to the site server
-
When operation log data is copied or moved from an another site server
-
When the operation log database on the site server is corrupted
-
When the database on the management server is corrupted
This command must be executed on the site server.
Format
recreatelogdb{ -all| -add| -node}
Argument
- -all
-
Re-creates indexes of the operation logs stored in the site server. Indexes are recreated after the command is completed, when the site server is started. Specify this argument to re-create indexes in such cases as when operation log data is moved or the database on the site server is corrupted.
If this command is executed with this argument when the site server is started, the server stops during command execution. The site server starts again when the command is completed. If this command is executed when the site server is stopped, the server remains stopped after the command is completed.
- -add
-
Creates additional operation log indexes. Indexes are created after the command is completed, when the site server is started. Specify this argument when additional operation logs are added to the site server. For example, specify when operation log data is moved from another site server.
If the command is executed with this argument when the site server is started, the server stops during command execution. The site server starts again when the command is completed. If this command is executed when the site server is stopped, the server remains stopped after the command is completed.
- -node
-
Reports the list of agent-operated logs managed by the site server up onto the management server. An index is not recreated. Specify this argument in the following cases:
-
There is no defect in the database on the site server, but database on the management server is corrupted. The operation logs cannot be searched correctly.
-
When the site server connection destination is changed to a management server in another system
-
When the database is rebuilt (the updatesupportinfo command is executed) on the management server
-
Storage location
site-server-installation-folder\mgr\bin\
Notes
-
When an argument other than -node is specified with the recreatelogdb command, the site server stops during command execution. Operation logs generated during the command execution cannot be viewed until the command is completed. Once the recreatelogdb command is completed, index creation begins when the site server starts. As the index creation process increases your server load, it might take a couple of days for the process to complete, depending on the size of the data. Operation logs generated during index creation cannot be viewed until index creation is completed. Keep these considarations in mind when executing the recreatelogdb command.
-
If the job status recording file for the deletelog command (deletelog_lasttime.txt) exists in the work folder, the recreatelogdb command fails. In such a case, re-execute the deletelog command to complete deletion of the operation logs, and then execute the recreatelogdb command.
-
If you moved operation logs to the data folder, and then re-created operation log indexes with the argument -all or -add specified, always execute the recreatelogdb command with the argument -node. By executing this command, a list of agent-operated logs is reported to the management server. If the logs are not reported to the server, a search through the operation logs might not be performed correctly.
-
Execute this command when the site server setup is completed.
-
This command cannot be simultaneously executed by multiple users.
Return value
The following table shows the return values of the recreatelogdb command.
Return value |
Description |
---|---|
0 |
The command finished normally. |
1 |
A warning was raised during command execution. The command stopped. |
11 |
The specified format for the argument is incorrect. |
31 |
Another command is being executed. |
51 |
You do not have the permissions to execute this command. |
54 |
The site server has not been set up. |
58 |
Failed to connect to the management server. |
62 |
A file access error occurred. |
67 |
A job status recording file for the deletelog command exists. |
101 |
Command execution failed because there is not enough memory, or due to some other reason. |
102 |
Failed to automatically stop the site server. |
120 |
A database access error occurred. |
Example
The following example shows use of this command to re-create indexes of the operation logs, in case the database on the site server has been corrupted.
recreatelogdb -all
Related Topics: