Reputation: 51
I have a program that saves logging data to an SQLite3 database. I would like to back up the database while the program is still running. I have accomplished this by using the SQLite Online Backup API (http://www.sqlite.org/backup.html) and it works fine, however it lags the process until the backup is complete...
Does anyone know of a way to do incremental backups in SQLite? I would preferably only backup new data, not the entire database each time I run the backup.
Upvotes: 5
Views: 3096
Reputation: 83
I made a library named sqlite3-incremental-backup (in NodeJS and Python) for this purpose if you want to have a look.
Upvotes: 0
Reputation: 1786
I don't think there is a general purpose solution to your problem.
If your logging data is timestamped and reasonably simple in structure, you could run a separate process to extract recent data and insert it into your backup stream.
Upvotes: 4