admin管理员组文章数量:1122832
I have a SQLite database which I'm accessing via mattn/go-sqlite3. I want to perform a live snapshot of that database. The catch is that the backup must be saved to an io.Writer
instance. Specifically, I am implementing the SaveSnapshot() function for a raft implementaiton.
I am trying to figure out if it is possible to use SQLite's online backup system to pipe to this Writer instance. Is there a special file or named pipe I can use as the output database?
More generally, I want to do an online snapshot and backup of my sqlite database. While SQLite has a backup system out of the box, I don't see how I can use it for a writer. I would be fine running a SELECT statement and copying data to my writer, but I am again not sure how to ensure I am seeing just a current snapshot of the data while allowing updates to happen while this is taking place.
本文标签: goBack up sqlite to ioWriterStack Overflow
版权声明:本文标题:go - Back up sqlite to io.Writer? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736302621a1931601.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论