Node:check-db, Next:gnats-pwconv, Previous:gen-index, Up:Admin utils
The check-db
script is useful for performing periodic checks on
database health. It accepts the following options:
-d databasename
--database=databasename
--all-databases
--database
option.
If no option is given, the default database is checked.
During its operation, check-db
first attempts to lock
database. If this is not possible, it repeats the locking
attempts for five minutes; if it fails, it sends a mail message
notifying the administrator of the failure and exits.
Once the database is locked, the script searches the database for lock files that are more than 24 hours old. Any old lock files are reported to the administrator in a mail message.
After checking for old lock files, it calls gen-index
(see Regenerating the index) and compares the
results with the current index
file of the database; any
inconsistencies are reported to the administrators in a mail message.
After checking the index file for inconsistencies, the script unlocks the database and exits.