boltdiff

command module
v0.0.0-...-9bf2a0b Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

README

boltdiff

A command-line tool to compare two BoltDB databases and show the differences.

usage

Installation

go install github.com/knqyf263/boltdiff@latest

Usage

boltdiff [options] DB1 DB2

Options

Option Description
-bucket value Bucket path to compare (can be specified multiple times for nested buckets)
-exclude-pattern string Exclude keys matching the regex pattern
-key-only Show only key names without value diffs
-raw Print raw bytes instead of strings
-skip-added Suppress added keys
-skip-deleted Suppress deleted keys
-skip-modified Suppress modified items
-summary Print only summary counts
-verbose Print verbose logs

Examples

Basic comparison
boltdiff db1.db db2.db

Output:

Deleted: 1
--- bucket1 -> key4

Added: 1
+++ bucket1 -> key5

Modified: 1
diff a/db1.db b/db2.db
--- a/bucket1 -> key3
+++ b/bucket1 -> key3
  string(
-     "old value",
+     "new value",
  )
Compare specific bucket
boltdiff -bucket mybucket db1.db db2.db
Compare nested bucket
boltdiff -bucket parent -bucket child db1.db db2.db
Show only key names (no value diffs)
boltdiff -key-only db1.db db2.db

Output:

Deleted: 1
--- bucket1 -> key4

Added: 1
+++ bucket1 -> key5

Modified: 1
*** bucket1 -> key3
Show only summary
boltdiff -summary db1.db db2.db

Output:

Deleted: 1

Added: 1

Modified: 1
Show only deleted keys
boltdiff -skip-added -skip-modified db1.db db2.db
Exclude keys by pattern
boltdiff -exclude-pattern "^temp.*" db1.db db2.db
Verbose output
boltdiff -verbose db1.db db2.db

Key Format

Keys are displayed in the format:

bucket1 -> bucket2 -> ... -> key

For nested buckets, each level is separated by ->.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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