How do I do incremental backups for SQLite?

旧时模样 提交于 2019-12-12 08:53:54

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!