How to restore a SQLite database while an open connection exists? How to restore a SQLite database while an open connection exists? sqlite sqlite

How to restore a SQLite database while an open connection exists?


If you can't do a file copy to restore the database then do the restore the hard way. Attach the backup database, delete all the data in the main database, then insert the data from the backup database.


I'm probably missing something here, but can't you just close your connection and reopen it after the copy?