Online backup

SQLite can back up database files while the app is running. This functionality is available in Microsoft.Data.Sqlite as the BackupDatabase method on SqliteConnection.

// Create a full backup of the database
var backup = new SqliteConnection("Data Source=BackupSample.db");
connection.BackupDatabase(backup);

Currently, BackupDatabase will back up the database as quickly as possible and blocks other connections from writing to the database. Issue #13834 would provide an alternative API to back up the database in the background and allow other connections to interrupt the backup and write to the database. If you're interested, provide feedback on the issue.