Get read access to locked database
I have a telegram bot that save users in leveldb. But now i need separate command that will send message or all users from DB. And i can't open db in separate script because DB is locked by bot. It's good. Now i have a trick to resolve this task: On each db.put i also save whole data from db in separate file. I wonder is level has some better way to resolve my task? Maybe level db has ability to open or read only with ignoring lock or other ability get whole data from locked db?
See rave-level and (for more control) many-level.
Alternatively, switch from LevelDB to RocksDB. Although we haven't updated our binding for RocksDB (rocksdb and level-rocksdb) in a while, it does have a readOnly option, that let's you open a db from multiple processes if they only need read access.