I am trying to recover a database of not more than 23 MB containing around 6 months of fitness related data. I transferred the file online from my phone to my laptop using Filezilla app (ASCII method) which added some bytes to the file causing it to corrupt. That is my hunch.
I am not able to open it in DB Browser for SQLite. Error - 'Could not open database file. Reason: database disk is malformed'.
.dump command from CLI:
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
/****** CORRUPTION ERROR *******/
/****** database disk image is malformed ******/
/****** ERROR: database disk image is malformed ******/
/****** CORRUPTION ERROR *******/
/****** database disk image is malformed ******/
/****** ERROR: database disk image is malformed ******/
/**** ERROR: (11) database disk image is malformed *****/
COMMIT;
How to recover a corrupt SQLite3 database?
Sqlite3 recover runs into out of memory error
I followed the suggestions given above but mostly ended with a blank db or sql file.
Then I tried the '.recover' method. It ran for a few seconds and gave the out of memory error. I need to bypass the OOM issue.
Thanks.