Today I was just opening up my sv.db file to check a player’s time (utime). I use WinSCP so I downloaded a temp file, opened it up in DB Browser for SQLite, found the time and closed the file. I didn’t save it, I didn’t upload it back to the server. I go eat dinner, and when I come back an hour later I try to open the sv.db file again. “Invalid file format”.
Fast forward about 20 minutes and I’ve found out that I somehow corrupted my data. From what I’ve read it can happen if you mess with the database file while it is reading or writing. Never happened to me before. I’ve tried using sqlite3 to dump it to an SQL file and put it back into a database file but the .sql file is riddled with /**** ERROR: (11) database disk image is malformed *****/ and I’ve lost my utime and playerpdata tables. Now, I did a backup of my server a week ago and I thought this wasn’t a problem, I would just upload the backup database to the server.
Of course, with my luck it turns out that I forgot to refresh the main window of WinSCP and I ended up downloading the sv.db file from the beginning of July.
I’ve searched the web and the only DIY recovery solution I’ve seen is dumping the database to a .sql file and putting it into another .db file. The only other option I’ve come across is SQLite Recovery which costs a whopping $130. I’m wondering if anyone out there has a solution to this problem. Any help is appreciated.