kvaudit

command
v0.0.0-...-e9cdcad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2018 License: BSD-3-Clause Imports: 8 Imported by: 0

README

kvaudit

Command kvaudit verifies kv databases.

Installation

$ go get github.com/cznic/kv/kvaudit

Documentation: godoc.org/github.com/cznic/kv/kvaudit

Documentation

Overview

Command kvaudit verifies kv databases.

Installation:

$ go get github.com/cznic/kv/kvaudit

Usage:

kvaudit [-d] [-f key] [-l key] [-max n] [-s] [-v] file

Options:

-b	analyze allocated/free blocks sizes vs FLT buckets

-d	dump file to stdout in cdbmake[2] format even for empty -f and -l.

-f key	dump from key, first existing if empty

-l key	dump to key, last existing if empty

-max	maximum number of errors to report. Default 10.	The actual
	number of reported errors, if any, may be less because many
	errors do not allow to reliably continue the audit.

-s	List DB statistics

-v	List every error in addition to the overall one.

Arguments:

file	For example: ~/foo/bar.db

Implementation Notes

The performed verification is described at [0]. This tool was hacked quickly to assist with resolving [1].

Known Issues

In this first release there's no file locking checked or enforced. The auditing process will _not_ write to the DB, so this cannot introduce a DB corruption (it's opened in R/O mode anyway). However, if the DB is opened and updated by another process, the reported errors may be caused only by the updates.

In other words, to use this initial version properly, you must manually ensure that the audited database is not being updated by any other process.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL