database maintenance utility for v6?

This is the place to help test and discuss Version 6 Beta releases.

database maintenance utility for v6?

Postby spotter » Mon Sep 19, 2011 2:13 am

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).
spotter
Seasoned User
Seasoned User
 
Posts: 172
Joined: Tue Feb 12, 2002 12:00 pm

Registered Newsbin User since: 05/05/06

Re: database maintenance utility for v6?

Postby itimpi » Mon Sep 19, 2011 3:10 am

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.
The Newsbin Online documentation
The Usenettools for tutorials, useful information and links
User avatar
itimpi
Elite NewsBin User
Elite NewsBin User
 
Posts: 12607
Joined: Sat Mar 16, 2002 7:11 am
Location: UK

Registered Newsbin User since: 03/28/03

Re: database maintenance utility for v6?

Postby Quade » Mon Sep 19, 2011 9:19 am

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.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44984
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: database maintenance utility for v6?

Postby spotter » Mon Sep 19, 2011 10:26 am

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.
spotter
Seasoned User
Seasoned User
 
Posts: 172
Joined: Tue Feb 12, 2002 12:00 pm

Registered Newsbin User since: 05/05/06

Re: database maintenance utility for v6?

Postby Quade » Mon Sep 19, 2011 11:18 am

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.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44984
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97


Return to Newsbin Version 6 Beta Support

Who is online

Users browsing this forum: Google [Bot] and 2 guests