How to recover a corrupt SQLite3 database?

前端 未结 12 2118
走了就别回头了
走了就别回头了 2020-11-28 03:46

This is a follow up question to a previously answered post: Is there a command line utility for validating SQLite databases in Linux?

If a database is producing the

12条回答
  •  日久生厌
    2020-11-28 04:01

    My method is similar, prevents a error rollback script:

    sqlite3 database.db ".dump" | sed -e 's|^ROLLBACK;\( -- due to errors\)*$|COMMIT;|g' | sqlite3 database.new
    

提交回复
热议问题