Answer the question
In order to leave comments, you need to log in
How to make a "hot" backup of SQLite3?
Hello,
I have never worked with small single-file databases like SQLite before, however, in a small home project I decided to use it because of its simplicity, almost zero administration and the out-of-the-box python driver.
What is: requests come to the web application every couple of seconds. The data from the request is parsed and, in a transaction, stored in the database by several writing requests.
I would like to: run a "hot" backup once a day. "Hot" means that it is unacceptable to lose requests to the web application. You can save them in a queue, but sooner or later, the data that came in requests must be added to the database in an orderly manner.
The current idea seems terribly clumsy to me: to add data to the database exclusively through a separate thread with a queue. At the same time, the thread has the ability to switch to the standby mode, for example, while the “backup is in progress” file flag is present, and copy the file from the database to the backup server.
How would you solve this problem?
Answer the question
In order to leave comments, you need to log in
I think the second example from this link will help you: http://www.sqlite.org/backup.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question