PLEASE NOTE: The procedures described here only work in P4 and earlier. They do NOT work in P5 due to the switch to a different database engine!
1. Using the P4 GUI
To perform a simple quick-check of index consistency and optionally schedule index recover from the GUI, follow these simple steps:
- Open the PresStore Browser
- Navigate to the General Setup / databases
- Select index database you want to check
- Pull down Edit and select the Check database
- Click on the Start button
This will initiate index consistency check. In the event of some non-repairable index problem, you will be presented with a list of media volumes needed to perform the index recovery. You can then start the index recovery if needed. Please note that this procedure might take some time to finish.
2. Using the P4 CLI
To perform a more elaborate index check, you need to access the P4 CLI and then issue commands to perform index operations. Over CLI, you have some more options when handling backup indexes. Please see the list of available commands below.
2.1 Check index
The command can be summarized as follows:
cli::index::backup::check <client_name> <option_list>
<client_name> name of the client <option_list> list of options, as follows:
- rebuild rebuild the index files
- fixshadows repair some rare table inconsistencies
- cleanup clean up the index directory structure
- cycles <num> limit the operation to <num> number of cycles (default is: 0, that is, all known cycles)
During the execution, this command will generate lots of log messages in the P4 server log file. You might examine this file to see the detailed info produced by the command. The command returns:
0 check and repair done OK 1 parts of the index are missing; use GUI to recover
Any other command result is a sign of a command failure.
Examples:
Purge and rebuild up to 2 index cycles for client localhost:
# bin/nsdchat -c cli::index::backup::check localhost -purge -rebuild -cycles 2 Rebuild all known index cycles of the client macsrv # bin/nsdchat -c cli::index::backup::check macserv -rebuild
2.2 List index cycles
This command is supported starting with 2.3.9 release. The command can be summarized as follows: cli::index::backup::getcycles <client_name> <backup_plan_id>
<client_name> name of the PresStore client <backup_plan_id> ID of the backup plan used to backup data
This command lists all available index cycles for the given client and backup plan ID. The first reported element represents the current (must recent) cycle, followed by older cycles.
Example:
# bin/nsdchat -c cli::index::backup::getcycles developsun 10009
Cycle ID: Creation Date: ---------- ----------------------------- 1180859877 Sun Jun 03 10:37:57 CEST 2007 1180601893 Thu May 31 10:58:13 CEST 2007
2.3 Drop (delete) index cycles
This command is supported starting with 2.3.9 release. The command can be summarized as follows:
cli::index::backup::dropcycle <client_name> <backup_plan_id> <cycle_id>
<client_name> name of the P4 client <backup_plan_id> ID of the backup plan used to backup data <cycle_id> ID of the cycle (see getcycles command)
This command drops one of the backup index cycles for the given client and backup plan ID. If the cycle being dropped is the current cycle it adjusts all backup tasks to point to the previous cycle. If there is no previous cycle, all the tasks will be set to default (as no backup was performed).
Example:
# bin/nsdchat -c cli::index::backup::dropcycle developsun 10009 1180859877
|