Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9139841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:26:22+00:00 2026-06-17T09:26:22+00:00

So I pulled a sqlite database from a formatted disk using testdisk. I have

  • 0

So I pulled a sqlite database from a formatted disk using testdisk. I have the file but it has a bunch of weird stuff in the middle of it that looked like some log from something. The point is that it is severely corrupted.

I do have an earlier version of the sqlite file though….

The earlier version of the file contains all the data that has weird stuff in it in the other file. The newer entries that the corrupted files has that the uncorrupted file does not have appear to be fine.

I have tried to repair the corrupted file using the various echo .dump methods and all that, but I get an empty file.

Baxters-MacBook-Pro:desktop bax$ sqlite3 corrupted.sqlite3
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> pragma integrity_check;
Error: database disk image is malformed

dumping gives me:

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 *****/
ROLLBACK; -- due to errors

I tried joining them dumbly in HEX. I pasted the contents of the old (not corrupted database) over the overlapping information in the corrupted file. That is, the last bit of data in the uncorrupted file was a timestamp, 15:15:14.419734 (the database is from an old rails app). I found that in the corrupted file and pasted the uncorrupted file hex over everything before that point in the corrupted file. So now it opens, but not surprisingly I can only get to the data from the uncorrupted file (about 122 of 160-something entries).

Where the two join looks like this:

15:15:14.419734√Ö√£)    �√ÖYAA{1B, 8B

1B, 8B is the beginning of an entry.

In hex:

31353A 31353A31 342E3431 39373334 C3851FC3 A3290900 
01C38501 59014141 7B31422C 203842

Is there any way for me to join these two databases, or am I boned?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:26:23+00:00Added an answer on June 17, 2026 at 9:26 am

    In SQLite files, table data is stored in b-trees; it is likely that your joined file does not contain the correct pointers in the upper tree levels.

    The FAQ says:

    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.

    But you could either

    • read the file format documentation and try to extract as much data as posssible from the file by hand or with some ad-hoc tool; or
    • pay somebody to do this for you.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From my SQLite database i pulled all of the entries that have Liquor in
i have a list of unique names that i pulled from an sqlite database
I am trying to get data pulled from a SQLite file, i have created
I have pulled data from the AudioBoo API. Each recoding has a time that
I have an address that is being pulled from database that interacts with Google
I pulled data from RETS server (Using one MLS) but now I am confusing
I pulled a number from a database, using the following code: @all = @m.query(SELECT
Overview So I have pulled out a document from my database. Inside is a
I have a sqlite database that has over 2000 low res thumbnails of pictures.
I have pulled the Bash script from here , which checks the AVI file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.