Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I do incremental backups for SQLite?

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.

like image 383
Jon Avatar asked Oct 11 '22 05:10

Jon


1 Answers

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.

like image 186
ddyer Avatar answered Oct 14 '22 05:10

ddyer