Created
May 1, 2020 10:10
-
-
Save kijart/f7e258ee2f86f0780d6821caa30f3662 to your computer and use it in GitHub Desktop.
Repair malformed sqlite database: https://stackoverflow.com/a/15874884
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# usage $0 database.sqlite3 | |
cat <( sqlite3 "$1" .dump | grep "^ROLLBACK" -v ) <( echo "COMMIT;" ) | sqlite3 "fix_$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment