Can LevelDB snapshots withstand database proximity?

I am wondering if the LevelDB library “snapshot” tool can create a link to a snapshot that could be saved even after the open database object was closed (and thus reused the next time it was opened).

I suspect not, which leads to the following: is there a good / recommended way to make a sequential backup of the database with a snapshot, ideally, even if other activities are ongoing? (That is, if you don't iterate the entire snapshot keyword through the API?)

(Essentially, I'm looking for something similar to keeping JDB log files for BerkeleyDB-JE applications only through a specific checkpoint.)

+5
source share
2 answers

A good approach would be to close the database and then hard-link all sst files (cp -l) and copy all non-sst files. Thus, you copy only a small amount of data (the size of your log, by default 4 MB). Then you can open the database again.

You need to block while this happens, but hopefully it should be fast.

+3
source

I suspect not, which leads to the following: is there a good / recommended way to make a sequential backup of the database with a snapshot, ideally, even if other activities are ongoing? (That is, if you don't iterate the entire snapshot keyword through the API?)

leveldb, , , : leveldb, leveldb. ?

+1

All Articles