]> git.proxmox.com Git - ceph.git/blame - ceph/src/rocksdb/include/rocksdb/db_dump_tool.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / rocksdb / include / rocksdb / db_dump_tool.h
CommitLineData
7c673cae 1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
11fdf7f2
TL
2// This source code is licensed under both the GPLv2 (found in the
3// COPYING file in the root directory) and Apache 2.0 License
4// (found in the LICENSE.Apache file in the root directory).
7c673cae
FG
5
6#pragma once
7#ifndef ROCKSDB_LITE
8
9#include <string>
10
11#include "rocksdb/db.h"
12
13namespace rocksdb {
14
15struct DumpOptions {
16 // Database that will be dumped
17 std::string db_path;
18 // File location that will contain dump output
19 std::string dump_location;
11fdf7f2 20 // Don't include db information header in the dump
7c673cae
FG
21 bool anonymous = false;
22};
23
24class DbDumpTool {
25 public:
26 bool Run(const DumpOptions& dump_options,
27 rocksdb::Options options = rocksdb::Options());
28};
29
30struct UndumpOptions {
31 // Database that we will load the dumped file into
32 std::string db_path;
33 // File location of the dumped file that will be loaded
34 std::string dump_location;
35 // Compact the db after loading the dumped file
36 bool compact_db = false;
37};
38
39class DbUndumpTool {
40 public:
41 bool Run(const UndumpOptions& undump_options,
42 rocksdb::Options options = rocksdb::Options());
43};
44} // namespace rocksdb
45#endif // ROCKSDB_LITE