Page 1 of 1

database maintenance utility for v6?

PostPosted: Mon Sep 19, 2011 2:13 am
by spotter
Does one exist? can't seem to find it if it does.

getting some group oriented dB errors (which makes some sense as I was suffering from bad ram for a short while).

Re: database maintenance utility for v6?

PostPosted: Mon Sep 19, 2011 3:10 am
by itimpi
Other than standard SQLite utilities, I do not believe there is one. The normal process if you suspect a bad .db3 file is to simply delete the offending file and let Newsbin create a fresh one.

Re: database maintenance utility for v6?

PostPosted: Mon Sep 19, 2011 9:19 am
by Quade
Yeah, once a DB3 is damaged, it's toast. You can dump the DB using Sqlite3.exe and re-create it but, you'll be missing some data.

Re: database maintenance utility for v6?

PostPosted: Mon Sep 19, 2011 10:26 am
by spotter
Honestly, don't care that I'd be missing data, I'd be missing a lot more impt usage data (i.e. what I've marked read, what I have deleted....) if I do a complete redonwload.

Re: database maintenance utility for v6?

PostPosted: Mon Sep 19, 2011 11:18 am
by Quade
Downloaded state is stored in another DB3.

X:\Newsbin 6 Datü>sqlite3.exe DownloadMarker.db3
SQLite version 3.7.4
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .output dump.txt
sqlite> .dump
sqlite> .quit

X:\Newsbin 6 Datü>sqlite3 test.db3
sqlite> .read dump.txt
sqlite> .quit


This is basically how you dump and re-store a db3.
1 - I'd copy the DB3 file to another name so, you don't work on the original file
2 - Make sure you have enough disk space, the dump will be larger than the DB3
3 - I'd "read" into a dummy DB3
4 - If the dump succeeds, you can rename the DB3 to replace the one you're dumping.

There's no guarantee to how much data you can recover. If you delete the range.db3 and let Newsbin re-download the headers WITHOUT doing a "download all" there's a good chance you can fill in the missing pieces.