Author Topic: Recover SQLite DB?  (Read 627 times)

0 Members and 1 Guest are viewing this topic.

Offline Tw2Stefan

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
Recover SQLite DB?
« on: April 19, 2018, 04:54:36 PM »
Hey y'all, long story short I have an sv.db that's nearly 1gb. Obviously that's a bit too much for a server so I attempted to recover the data and transfer it out. The DB is so corrupt that VACUUM doesn't work and dumping the data to SQL files didn't work.

Do y'all have any methods of recovering old sv.db that I should try?

Offline Timmy

  • Ulysses Team Member
  • Full Member
  • *****
  • Posts: 217
  • Karma: 160
  • Code monkey
    • ULX Unofficial Documentation
Re: Recover SQLite DB?
« Reply #1 on: April 20, 2018, 03:02:38 AM »
According to the SQLite FAQ (https://www.sqlite.org/faq.html#q21):
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.

What is the output of the command below? (Make sure you have sqlite3 installed.)
Code: [Select]
$ sqlite3 sv.db "PRAGMA integrity_check"
Can you clarify what you mean by “didn’t work”? Did an error occur when dumping the data? Was only part of the data recovered?
“When given the choice between being right or being kind, choose kind.”  —Dr. Wayne Dyer