SQLite Forum

Memory cache
Login
Yes, there is backup() function that can copy DB from/to disk and memory.

Two options:

- :memory: single thread DB - dies after close last connection
- file:db_name?mode=memory&cache=shared - cross thread DB, dies after process exits

Here is example in python3: https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.backup