Perform an integrity check on the given database.
Usage: checkdb [-BRv] [-C] DBPATH checkdb [-BRv] -c DBPATH checkdb [-BRv] -r DBPATH checkdb -h Actions: -c Check the database integrity and update its backup if not corrupted. -C Check the database integrity, attempt to repair it if corrupted and update its backup if not corrupted. -r Restore the database from its backup. DBPATH must not exist. Default action is -C. Options: -B : Don't create a backup of the database even if it pass the integrity check. -R : Don't restart daemons once done. -v : Be verbose. Exit Status: 64 (USAGE) Bad usage. Use -h to get some help. 65 (DATAERR) The database is corrupted and/or cannot be repaired. 69 (UNAVAILABLE) Unable to restart some daemons. 70 (SOFTWARE) An internal error occured. 74 (IOERR) Unable to empty the backup. 75 (TEMPFAIL) Lock prevent operating on the live database. 78 (CONFIG) Missing live database file. Or unable to create the backup directory.
foo>checkdb -C /var/db/reports/reports.db Now running: 57360 reports: Checking integrity of the live database... Executing: enlock -s reporting -c trylock -p 57360 Executing: enlock -s reporting -c unlock -p 57360 reports: Integrity check passed. reports: Updating backup database... Executing: mkdir -p /data/Main/Reports//var/db/reports Executing: mv /data/Main/Reports//var/db/reports/reports.db /data/Main/Reports//var/db/reports/reports.db.orig Executing: enlock -s reporting -c trylock -p 57360 Executing: enlock -s reporting -c unlock -p 57360 Executing: rm /data/Main/Reports//var/db/reports/reports.db.orig reports: Backup database written to /data/Main/Reports//var/db/reports/reports.db. foo>