CEPH-KVSTORE-TOOL(8) Ceph CEPH-KVSTORE-TOOL(8)

# [NAME](#NAME)

ceph-kvstore-tool - ceph kvstore manipulation tool

# [SYNOPSIS](#SYNOPSIS)

```
ceph-kvstore-tool <rocksdb|bluestore-kv> <store path> command [args...]
```

# [DESCRIPTION](#DESCRIPTION)

**ceph-kvstore-tool** is a kvstore manipulation tool. It allows users to manipulate RocksDB's data (like OSD's omap) offline.

# [COMMANDS](#COMMANDS)

**ceph-kvstore-tool** utility uses many commands for debugging purpose which are as follows:

[**list \[prefix\]**](#list)

Print key of all KV pairs stored with the URL encoded prefix.

[**list-crc \[prefix\]**](#list~2)

Print CRC of all KV pairs stored with the URL encoded prefix.

[**dump \[prefix\]**](#dump)

Print key and value of all KV pairs stored with the URL encoded prefix.

[**exists &lt;prefix&gt; \[key\]**](#exists)

Check if there is any KV pair stored with the URL encoded prefix. If key is also specified, check for the key with the prefix instead.

[**get &lt;prefix&gt; &lt;key&gt; \[out &lt;file&gt;\]**](#get)

Get the value of the KV pair stored with the URL encoded prefix and key. If file is also specified, write the value to the file.

[**crc &lt;prefix&gt; &lt;key&gt;**](#crc)

Get the CRC of the KV pair stored with the URL encoded prefix and key.

[**get-size \[&lt;prefix&gt; &lt;key&gt;\]**](#get~2)

Get estimated store size or size of value specified by prefix and key.

[**set &lt;prefix&gt; &lt;key&gt; \[ver &lt;N&gt;|in &lt;file&gt;\]**](#set)

Set the value of the KV pair stored with the URL encoded prefix and key. The value could be *version\_t* or text.

[**rm &lt;prefix&gt; &lt;key&gt;**](#rm)

Remove the KV pair stored with the URL encoded prefix and key.

[**rm-prefix &lt;prefix&gt;**](#rm~2)

Remove all KV pairs stored with the URL encoded prefix.

[**store-copy &lt;path&gt; \[num-keys-per-tx\]**](#store)

Copy all KV pairs to another directory specified by **path**. \[num-keys-per-tx] is the number of KV pairs copied for a transaction.

[**store-crc &lt;path&gt;**](#store~2)

Store CRC of all KV pairs to a file specified by **path**.

[**compact**](#compact)

Subcommand **compact** is used to compact all data of kvstore. It will open the database, and trigger a database's compaction. After compaction, some disk space may be released.

[**compact-prefix &lt;prefix&gt;**](#compact~2)

Compact all entries specified by the URL encoded prefix.

[**compact-range &lt;prefix&gt; &lt;start&gt; &lt;end&gt;**](#compact~3)

Compact some entries specified by the URL encoded prefix and range.

[**destructive-repair**](#destructive)

Make a (potentially destructive) effort to recover a corrupted database. Note that in the case of rocksdb this may corrupt an otherwise uncorrupted database--use this only as a last resort!

[**stats**](#stats)

Prints statistics from underlying key-value database. This is only for informative purposes. Format and information content may vary between releases. For RocksDB information includes compactions stats, performance counters, memory usage and internal RocksDB stats.

[**histogram**](#histogram)

Presents key-value sizes distribution statistics from the underlying KV database.

# [AVAILABILITY](#AVAILABILITY)

**ceph-kvstore-tool** is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at &lt;https://docs.ceph.com&gt; for more information.

# [SEE ALSO](#SEE_ALSO)

ceph &lt;&gt;(8)

# [Copyright](#Copyright)

2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)

September 24, 2026 dev

---

Document: ceph-kvstore-tool(8) from ceph-20 20.2.4-r4 (Chainguard OS)
Source: https://github.com/ceph/ceph.git
