mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-27 02:44:18 +00:00
15325bf55b
Summary: Hack up rocksdb_dump and rocksdb_undump utilities to get this task rolling/promote discussion. Test Plan: Dump/undump databases recursively to see if nothing is lost. Reviewers: sdong, yhchiang, rven, anthony, kradhakrishnan, igor Reviewed By: igor Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D37269
17 lines
763 B
Markdown
17 lines
763 B
Markdown
## RocksDB dump format
|
|
|
|
The version 1 RocksDB dump format is fairly simple:
|
|
|
|
1) The dump starts with the magic 8 byte identifier "ROCKDUMP"
|
|
|
|
2) The magic is followed by an 8 byte big-endian version which is 0x00000001.
|
|
|
|
3) Next are arbitrarily sized chunks of bytes prepended by 4 byte little endian number indicating how large each chunk is.
|
|
|
|
4) The first chunk is special and is a json string indicating some things about the creation of this dump. It contains the following keys:
|
|
* database-path: The path of the database this dump was created from.
|
|
* hostname: The hostname of the machine where the dump was created.
|
|
* creation-time: Unix seconds since epoc when this dump was created.
|
|
|
|
5) Following the info dump the slices paired into are key/value pairs.
|