Hello,

On the current FAQ, item #20 (http://www.sqlite.org/faq.html#q20) and
possibly #20 needs updating:

20. "...If SQLITE_SECURE_DELETE is not used and VACUUM has not been run,
then some of the deleted content might still be in the database file, in
areas marked for reuse. But, again, there exist no procedures or tools that
we know of to help you recover that data."

21. "...Depending how badly your database is corrupted, you may be able to
recover some of the data by using the CLI to dump the schema and contents
to a file and then recreate. Unfortunately, once humpty-dumpty falls off
the wall, it is generally not possible to put him back together again."


There are in fact at least two excellent tools to do data recovery for
whole SQLite databases and individual records, and they can help in cases
of hardware failure, software errors or human problems.

PhotoRec is open source and multi-platform (
http://www.cgsecurity.org/wiki/PhotoRec#Known_file_formats).  While
historically, it was used for images and pdfs, it now supports SQLite
recovery (http://www.cgsecurity.org/wiki/File_Formats_Recovered_By_PhotoRec),
along with 220+ binary file types.  If a database (or entire directory) is
deleted, PhotoRec can often restore the db file to a sane-enough state to
be opened and exported.

In addition, the commercial product Epilog by CCL Forensics (
http://www.cclgroupltd.com/General-News/new-epilog-and-signature-version-released.html)
can do very advanced record recovery, including retrieving data from the
write-ahead log (WAL) transaction files. It is a few hundred dollars, but
it can do fairly amazing forensic reconstruction on SQLite data.

Both the above have saved my hide several times, so passing this along for
others who may have lost hope in deleted/corrupted databases (as well as
genuine forensics for popular use cases, like mobile phones, browsers,
address books, etc.)

I think the FAQ should at least mention that one can google "sqlite
recovery" or something if it's verboten to mention other projects/products
by name.

Cheers,

K. White
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to