SQLite Forum

Hot backup database in WAL mode by coping
Login
> It will be consistent with the last checkpoint before the lock was taken.

We have established earlier, there is no built-in way to guarantee creating a last checkpoint *and* taking the lock without another command being executed in between.

That is why I consider just backing up `-wal` as well (and restoring). It should still be consistent, correct?

> The copy must be performed by a separate process (not thread).

Ok, yes coping is going to be performed by a separate processes.

Out of curiosity, what is the problem there? Can opening another file descriptor for the same file disturb SQLite in some ways?