]> git.proxmox.com Git - ceph.git/blame - ceph/doc/man/8/ceph-kvstore-tool.rst
import quincy beta 17.1.0
[ceph.git] / ceph / doc / man / 8 / ceph-kvstore-tool.rst
CommitLineData
b32b8144
FG
1:orphan:
2
3=====================================================
4 ceph-kvstore-tool -- ceph kvstore manipulation tool
5=====================================================
6
7.. program:: ceph-kvstore-tool
8
9Synopsis
10========
11
12| **ceph-kvstore-tool** <leveldb|rocksdb|bluestore-kv> <store path> *command* [args...]
13
14
15Description
16===========
17
11fdf7f2 18:program:`ceph-kvstore-tool` is a kvstore manipulation tool. It allows users to manipulate
b32b8144
FG
19leveldb/rocksdb's data (like OSD's omap) offline.
20
21Commands
22========
23
24:program:`ceph-kvstore-tool` utility uses many commands for debugging purpose
25which are as follows:
26
27:command:`list [prefix]`
28 Print key of all KV pairs stored with the URL encoded prefix.
29
30:command:`list-crc [prefix]`
31 Print CRC of all KV pairs stored with the URL encoded prefix.
32
11fdf7f2
TL
33:command:`dump [prefix]`
34 Print key and value of all KV pairs stored with the URL encoded prefix.
35
b32b8144
FG
36:command:`exists <prefix> [key]`
37 Check if there is any KV pair stored with the URL encoded prefix. If key
38 is also specified, check for the key with the prefix instead.
39
40:command:`get <prefix> <key> [out <file>]`
41 Get the value of the KV pair stored with the URL encoded prefix and key.
42 If file is also specified, write the value to the file.
43
44:command:`crc <prefix> <key>`
45 Get the CRC of the KV pair stored with the URL encoded prefix and key.
46
47:command:`get-size [<prefix> <key>]`
48 Get estimated store size or size of value specified by prefix and key.
49
50:command:`set <prefix> <key> [ver <N>|in <file>]`
51 Set the value of the KV pair stored with the URL encoded prefix and key.
52 The value could be *version_t* or text.
53
54:command:`rm <prefix> <key>`
55 Remove the KV pair stored with the URL encoded prefix and key.
56
57:command:`rm-prefix <prefix>`
58 Remove all KV pairs stored with the URL encoded prefix.
59
60:command:`store-copy <path> [num-keys-per-tx]`
61 Copy all KV pairs to another directory specified by ``path``.
62 [num-keys-per-tx] is the number of KV pairs copied for a transaction.
63
64:command:`store-crc <path>`
65 Store CRC of all KV pairs to a file specified by ``path``.
66
67:command:`compact`
68 Subcommand ``compact`` is used to compact all data of kvstore. It will open
69 the database, and trigger a database's compaction. After compaction, some
70 disk space may be released.
71
72:command:`compact-prefix <prefix>`
73 Compact all entries specified by the URL encoded prefix.
74
75:command:`compact-range <prefix> <start> <end>`
76 Compact some entries specified by the URL encoded prefix and range.
77
11fdf7f2
TL
78:command:`destructive-repair`
79 Make a (potentially destructive) effort to recover a corrupted database.
80 Note that in the case of rocksdb this may corrupt an otherwise uncorrupted
81 database--use this only as a last resort!
82
eafe8130
TL
83:command:`stats`
84 Prints statistics from underlying key-value database. This is only for informative purposes.
85 Format and information content may vary between releases. For RocksDB information includes
86 compactions stats, performance counters, memory usage and internal RocksDB stats.
87
20effc67
TL
88:command:`histogram`
89 Presents key-value sizes distribution statistics from the underlying KV database.
90
b32b8144
FG
91Availability
92============
93
94**ceph-kvstore-tool** is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to
20effc67 95the Ceph documentation at https://docs.ceph.com for more information.
b32b8144
FG
96
97
98See also
99========
100
101:doc:`ceph <ceph>`\(8)