symisc/unqlite

How to recover the data from the unqlite_journal file.

hitenTest opened this issue · 1 comments

Hi team,

I'm using the UnQLite database to key-value pair for my network manager (NM). I'm reading the configuration of NM from network_manager.db file.

While performing the LTP test suite I'm getting the below Error:

Cannot rollback journal file 'network_manager.db_unqlite_journal' due to a read-only database handle

How we can recover the data from unqlite_journal file.

Hi, you have to open the database in read-write mode. As the log message stated, the database was opened in read-only mode thus any disk writing operation could not be performed.

You have to pass UNQLITE_OPEN_CREATE or UNQLITE_OPEN_READWRITE to unqlite_open() to open the database with read+write privilege.