> Every 30 seconds, stop writing, make a copy of the old database to a new file
I hope that by "copy of the old database" you mean "Using the SQLite Online Backup API"[1].
This procedure [copy of sqlite3 database files] 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.
* It cannot be used to copy data to or from in-memory databases.
* If a power failure or operating system failure occurs while copying the database file the backup database may be corrupted following system recovery.
I hope that by "copy of the old database" you mean "Using the SQLite Online Backup API"[1].
[1] https://www.sqlite.org/backup.html