2017-05-17 16:08:57 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <experimental/filesystem>
|
|
|
|
|
2017-12-20 19:48:19 +08:00
|
|
|
#include "database/graph_db.hpp"
|
2017-05-17 16:08:57 +08:00
|
|
|
|
2017-11-13 16:50:49 +08:00
|
|
|
namespace durability {
|
2017-10-25 21:28:10 +08:00
|
|
|
|
2017-05-17 16:08:57 +08:00
|
|
|
/**
|
2017-11-13 16:50:49 +08:00
|
|
|
* Make snapshot and save it in snapshots folder. Returns true if successful.
|
2017-12-20 19:48:19 +08:00
|
|
|
* @param db - database for which we are creating a snapshot
|
2017-11-20 18:58:05 +08:00
|
|
|
* @param durability_dir - directory where durability data is stored.
|
|
|
|
* @param snapshot_max_retained - maximum number of snapshots to retain.
|
2017-05-17 16:08:57 +08:00
|
|
|
*/
|
2018-01-18 17:22:54 +08:00
|
|
|
bool MakeSnapshot(database::GraphDb &db,
|
|
|
|
const std::experimental::filesystem::path &durability_dir,
|
2017-11-13 16:50:49 +08:00
|
|
|
int snapshot_max_retained);
|
2017-12-20 19:48:19 +08:00
|
|
|
} // namespace durability
|