Deleted SQLite records can sometimes be recovered if their bytes still survive. Start with a working copy of the database and preserve any matching WAL, SHM, or rollback journal files.
We deliberately deleted row 4 from a control table in the test database. Firefly found the complete 39-byte cell in unallocated space on page 3 at file offset 12,213 (0x2FB5). The row ID, marker, and source location matched the test manifest. The working copy’s SHA-256 was unchanged after the run.
Read the full 2.02 GiB recovery test or compare complete and partial SQLite recovery results.
Keep the original files intact. Work from copies of the database and any matching -wal, -shm, or -journal files. Keep their original filenames together.
Record what is visible in the live table. Examine the available WAL or rollback journal and check free space in the main file for surviving data. The files and database history determine what you can find.
Record the source file, page, and byte offset where available. Compare the content with the table schema, live rows, and any available committed states. Describe partial records by what survived.
A source can contain a current row, an earlier copy, or a fragment. SQLite may reuse the space, and bytes that have been overwritten are no longer available from that location.
| Source | What to check |
|---|---|
| WAL | Frames store page images. Compare the same record across available committed states. A matching SHM file indexes WAL frames. |
| Rollback journal | Where journal pages survive, look for page images from before a transaction changed them. See the tested journal example. |
| Freelist pages | Pages released for reuse can still hold earlier content. Use the remaining page structure and record bytes to assess what survived. |
| Freeblocks | The freeblock chain identifies reusable space within a B-tree page. A block’s header can overwrite part of a previous cell. |
| Unallocated region | Check the gap between the cell pointer array and the cell content area. It can preserve records or fragments outside the freeblock chain. |
Sometimes. An app may hide a message, change a status field, or remove a row. Check the live tables and matching companion files, then assess which record bytes and context survive.
Complete describes the surviving cell. Compare the record with the live table and available committed states. A page split can leave a complete copy of a row that still exists in the table.
Yes. A checkpoint copies changes into the main database. Older frames can remain until the file is reused, truncated, or removed. Preserve the matching WAL with the database.
SQLite’s .recover command salvages data from corrupt database files and may surface old content. For a forensic finding, verify the recovered data against the source and document its context.
In a demo, see how Firefly finds surviving data and traces a record back to its source. To practice the method on your own schedule, see the Guided On-Demand SQLite Forensics course.
Continue through related SQLite investigation workflows and connect this topic back to the main forensic tool.