SQLite Forum

Hot backup database in WAL mode by coping
Login
> > 1. Process 1 is used solely for the purpose stated and nothing else.
> 
> So process 1 is a Python process and uses the database before and after. Before the Backup start it would execute BEGIN IMMEDIATE and hold that connection open while Process 2 is backing up the files. Process 2 continues to query the database during the backup.

Sorry, I meant "Process 1 continues to query the database during the backup."

> Which word of not used for any other purpose [stated] is causing confusion?

I guess the confusion stems from what "any other purpose [stated]" exactly refers to.

Of course I want to be able to continue doing work in Process 1. From what I understand, the whole idea of an Online Backup is being able to at least read from the database while doing the backup... Otherwise, what is the purpose of that whole endeavor? I could just close the database connection.

The linked Documentation says:

>  This procedure works well in many scenarios and is usually very fast. However, this technique has the following shortcomings:
> 
> * Any database clients wishing to write to the database file while a backup is being created must wait until the shared lock is relinquished. 

That is a clear statement about writes. Reading the database works during holding that lock, and I don't see a reason why it should affect the Backup Process 2 is doing during that time.