On 5 Apr 2010, at 10:42pm, Joshua Redstone wrote: > I'm looking for an easy way to backup a sqlite3 database while it is in use. > If I could get away with linux 'cp', that'd be easier than > writing c++ code according to the online backup API > (http://www.sqlite.org/backup.html), and also it has the advantage that it > would not block writes. Initially I thought that 'cp' would be safe because > sqlite is crash-safe, but then I realized that 'cp' is not atomic, so it's > possible it won't work.
Correct. You may catch the database while it is being changed with, for example, a row changed and an index not updated yet. Either use the backup API as you mentioned or write code to read every row of every table. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users