forked from twmht/python-rocksdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
backup.pxd
35 lines (29 loc) · 1.15 KB
/
backup.pxd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from libcpp cimport bool as cpp_bool
from libcpp.string cimport string
from libcpp.vector cimport vector
from libc.stdint cimport uint32_t
from libc.stdint cimport int64_t
from libc.stdint cimport uint64_t
from status cimport Status
from db cimport DB
from env cimport Env
cdef extern from "rocksdb/utilities/backupable_db.h" namespace "rocksdb":
ctypedef uint32_t BackupID
cdef cppclass BackupableDBOptions:
BackupableDBOptions(const string& backup_dir)
cdef struct BackupInfo:
BackupID backup_id
int64_t timestamp
uint64_t size
cdef cppclass BackupEngine:
Status CreateNewBackup(DB*, cpp_bool) nogil except+
Status PurgeOldBackups(uint32_t) nogil except+
Status DeleteBackup(BackupID) nogil except+
void StopBackup() nogil except+
void GetBackupInfo(vector[BackupInfo]*) nogil except+
Status RestoreDBFromBackup(BackupID, string&, string&) nogil except+
Status RestoreDBFromLatestBackup(string&, string&) nogil except+
cdef Status BackupEngine_Open "rocksdb::BackupEngine::Open"(
Env*,
BackupableDBOptions&,
BackupEngine**)