0

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.

  • Did you try to transfer the DB file in binary mode? – Markus Apr 13 '23 at 16:25
  • No. I didnt have access to it as I formatted the phone thinking I had backed up a good copy. – ManiacBegbie Apr 14 '23 at 13:02
  • And your target system is windows? Please check: https://superuser.com/questions/195612/recovering-corrupted-files-uploaded-in-wrong-ftp-mode – Markus Apr 14 '23 at 15:19
  • I transferred the file from Android to Mac using Filezilla. Corruption of data due to additional bytes could just be my hunch. What I really want is a method to run the .recover command on Mac/Windows/Linux without running into OOM isssue. – ManiacBegbie Apr 15 '23 at 08:45
  • Which MAC OS Version? https://stackoverflow.com/a/1761086/18667225 – Markus Apr 17 '23 at 13:47
  • MacOS Catalina. Currently on 10.15.7. – ManiacBegbie Apr 20 '23 at 09:30

0 Answers0