SpottedSqueak / FA-Gallery-Downloader

Dead simple gallery download for FurAffinity
MIT License
43 stars 5 forks source link

Corrupted database #22

Open Nomaxice opened 2 months ago

Nomaxice commented 2 months ago

I somehow ended up with a corrupted db, seems the drive I was archiving to had a hiccup that crashed the program while it was downloading data, and now the program crashes on start reporting a corrupt database. Is there any way to recover the DB or is it lost and I gotta rebuild everything? Log attached thereafter. debug-2024-08-29.log

SpottedSqueak commented 2 months ago

Hmmm...There might be a few ways, but not any way I can do from within the program I think. You'd have to download sqlite3 for your OS and run a recover command from the command line.

Would you be willing to send me your DB file so I could check it?

Nomaxice commented 2 months ago

Sure thing, where can I send it to you? It's too large, even compressed, for github.

Nomaxice commented 2 months ago

Holly fluff, I went to look following what you prompted with a copy of the corrupt DB to see if I could figure it out, took a while and had some issues with encoding with CMD/PS and whatnot, but I managed to make a recover and then write to a new DB, and it worked, it seems, I just loaded the program successfully with the full DB! Thanks for the prompt on this, good to know for future reference, though I'll also make sure to do backups regularly of that too now. Shame the program can't do it itself, I saw some things about implementing the recover but it might make things way heavier and need extra dependencies. Still, thanks again from the pointers, and if anyone has a corrupt DB too and sees this, I'd be happy to help.

Nomaxice commented 2 months ago

(actually reopening for a suggestion, how feasible would it be for the program to create a copy of the DB on startup after it successfully verified/loaded it, so in case it fails down the line you can just rename the previous version and start back from there if you're not tech savy?)

Nomaxice commented 2 months ago

I'm at a loss for words. Rest in peace Fomo. Thanks for making this amazing piece of software among so many other things you made for this community.