问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/5749130/how-do-i-do-incremental-backups-for-sqlite