There exists a database which was written to with a program designed in Python that utilizes the sqlite3 module. The database had a lot of place claims performed onto it, however the transaction never was ended with a commit.

As a result we've two files:

     Size             Time       Name
855117824 2010-12-14 15:27 db
  1665240 2010-12-14 15:27 db-journal

The database file is big, but the majority of the information is uncommitted then when we choose in the database, we simply obtain a couple of rows. Whenever we execute the sql command 'VACUUM', the database reduces to around 3MB.

Can there be any method of getting the information back?

I carried out a little of testing while using sqlite3 spend program.

Presuming the sqlite3 Python module reacts very much the same, there doesn't appear to become a method to dependably recover uncommitted transactions.

For any relatively few claims, uncommitted transactions appear to stay entirely within the application memory only with no information is written towards the filesystem. Individuals insertions are completely lost when the DB connection is closed or even the application terminates.

For bigger transaction blocks data is written towards the filesystem, but it's cleared up when the DB connection is closed or (when the application crashes) around the next open from the DB. Basically, new DB pages get allotted for that uncommitted transaction, but when the transaction isn't committed they're considered free space, and that's why VACUUM cuts down on the DB size. These pages is going to be written to (as well as their data lost) in the next email the DB file. If they're in the finish from the DB file, the file simply will get cut down at clean-up.

You might have the ability to recover some data in the last uncommitted transaction which was carried out, as lengthy as not one other write transaction was carried out later on. In the way your real question is phrased, it may sound as though the entire DB was produced and completed just one program run along with a single transaction (although VACUUM wouldn't produce this type of large file then). For the reason that situation things might be a little simpler.

It heavily is dependent on how the acting up program was ended. Should you permitted it to terminate beautifully it might have experienced time to wash-up, which within this situation isn't desirable. Since you will find the DB journal I'll think that it were built with a more violent finish.

Regardless, you would need to a minimum of explore the sqlite3 DB extendable and customize the library code to parse the uncommitted data. You still lose individuals areas of the transaction that continued to be within the application memory.

If there have been free pages (e.g. from DELETE claims) within the DB file there may be also fragments of older transactions, although interpretting individuals fragments is yet another story.

For me, the entire operation will stray far too close (otherwise outright enter) towards the fields laptop or computer forensics and file recovery, together with all of the relevant issues. Unless of course you've vital data that you simply cannot enter every other way, I doubt it will likely be simple to become worthwhile.