On Wed, Jan 27, 2016 at 6:28 AM, Jay Kreibich <jay at kreibi.ch> wrote:
>
> The backup API is not designed to recover corrupted databases.
>
> Generally speaking, there is no standard way to recover from a corrupt 
> database.  The best policy is not to corrupt it in the first place.  In 
> practice, if you follow the rules, it is very very hard to corrupt a 
> database.  Just be sure you?re not breaking one of the rules; if the database 
> is inside another database, I question how locks and matched auxiliary files 
> (journal, for example) are being handled.
>
It's not in another database, but rather a encrypted vfs.  I assume it
happened while debugging and stopping at a breakpoint and aborting the
process; in general use I don't expect this to happen.

*sigh* guess I get to implement the 'hard' way then.

> https://www.sqlite.org/howtocorrupt.html
>
>   -j
>
>
> On Jan 27, 2016, at 7:47 AM, J Decker <d3ck0r at gmail.com> wrote:
>
>> I was wondering if the backup api (sqlite3_backup_init, et al. ) will
>> help to recover a corrupt DB?  All the other mechanisms are an export
>> and re-import into a new DB...
>>
>> The database exists in a encrypted database that it's really difficult
>> to get the keys outside of the program and I don't look forward to
>> doing something that iterates through sqlite_master to get all the
>> tables do all the selects and re-insert... so I browsed the API and
>> found the _backup_ stuff.. but; I'm starting to think that it will
>> just be a faithful page replication and the result will still be
>> corrupted.
>> ( I don't know what the corruption is)
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users at mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
> --
> Jay A. Kreibich < J A Y @ K R E I B I.C H >
>
> "Intelligence is like underwear: it is important that you have it, but 
> showing it to the wrong people has the tendency to make them feel 
> uncomfortable." -- Angela Johnson
>
>
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to