Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.