Beezcli Tool
Speedb Interactive tool
Introduction
The beezcli command line tool offers multiple data access and database admin commands. beezcli supports interactive mode with history and it will remember the --db and --secondary_path once the interactive mode is being enabled.
beezcli is wrapping RocksDB's and LevelDB's ldb tool.
Some examples are listed below. For more information, please consult the help message displayed when running beezcli without any arguments or with --help.
How to use it?
The beezcli tool is available under the tools directory in Speedb repository.
By default, `beezcli` can only be used against a DB that is offline. Operating the DB, even for read-only operations, might make changes to the DB directory, e.g. info logs.
Open as secondary
An option `--secondary_path=<secondary_path>` would open the DB as a [[Secondary instance]], which can be used to open a running DB and/or to minimize impacts to the DB directory. This argument can be used for any beezcli command, but since not all operations can be done against secondary instances, some operations will fail. Besides write operations which would definitely fail with secondary instances, some read operations might also fail.
Compilation and dependencies
Dependencies
- cmake
- make
- gflags
- snappy
- zlib
- bzip2
- zstandard
- lz4
- gnu readline
How to compile
For mac os and Linux:
Notice: Currently the tool is not supported on Windows
Example for interactive mode
Example data access:
Example dump database:
Example data access sequence:
To dump an existing speedb database in HEX:
To load the dumped HEX format data to a new Speedb database:
To compact an existing Speedb database:
You can specify the command line `--column_family=<string>` for which column family your query will be against.
`--try_load_options` will try to load the options file in the DB to open the DB. It is a good idea to always try to have this option on when you operate the DB. If you open the DB with default options, it may mess up LSM-tree structure which can't be recovered automatically.
Last updated