[Interest] SQLite Online Backup API

Alexander Dyagilev alervdvcw at gmail.com
Tue Jan 21 14:13:57 CET 2020


Hello,

It seems that it's impossible to use SQLite Online Backup API via Qt API.

So I have created a ticker here:
https://bugreports.qt.io/browse/QTBUG-81564

Are there any workarounds to backup database to some file on disk?

The only way I see now is to use mutex and aquire it before doing any 
write operations to DB.

Backup operation locks this mutex also and then just copies the database 
file.

Additionally, backup operation uses "BEGIN IMMEDIATE;" SQLite query 
before backup (but after locking the mutex) and ROLLBACK; after it (and 
before unlocking the mutex).

SQLite Online Backup API would be much easier, of course.



More information about the Interest mailing list