Gossamer Forum
Home : Products : Links 2.0 : Discussions :

nph-build dumping data from links.db

Quote Reply
nph-build dumping data from links.db
Help,

My links.db file currently has 10,000+ records in it. Night before last when doing a build I noticed that the final output screen indicated that it had built pages for 7,239 links, 259 categories. Where did the remaining 3,000 links go? I wondered.

I've checked the daily backup copies of the db ($date_links.db) and sure enough the files are getting smaller with each build, not larger.

Investigating, I believe the problem is in the File::Copy portion of nph-build. Last night I FTP'd a clean 10,000+ records links.db to my web server, ran the nph-build, and when it was over the new links.db file contained just over 7,000 records. The missing 3,000 seem to have been dropped from the end of the file.

Any clues? Everytime I run a build now my database gets smaller -- which is not the direction I want to be heading.

Richard
Quote Reply
Re: nph-build dumping data from links.db In reply to
What is the number contained in linksid.txt? Is it higher than the highest number used by Links in the links.db?

Is there a possibility that the links.db has been corrupted somehow?
Quote Reply
Re: nph-build dumping data from links.db In reply to
The linksid.txt file was one of the first things I checked. Yes, it's number is +1 from the last record in links.db, as it should be.

As for corruption.... When I first noticed the problem I downloaded the the last known "good" links.db backup, as well as the current links.db file, uploaded both files into Access, and ran a "find unmatched records" run against the two - which is how I discovered that 3,000 records were missing.

I also discovered that the current links.db was not sorted by linkid like the good db was. Not all of the records were out of order, just the records with a linkid over 8,000.

I then took the last known "good" links.db I had, ran a sort on it to ensure that all of the records would be sorted by linkid, ran a couple of filters on it to ensure that there weren't any erroneous characters in the db fields ("<>&%$, etc...."), uploaded it back to my web server, ran npg-build again (staggered mode -- the build all keeps timing out on me for some reason).

This new build was mostly successful. During the File::Copy it only dropped 500 records from the links.db file. All of the records were dropped from the end of the file.

Rich
Quote Reply
Re: nph-build dumping data from links.db In reply to
I'm having the same problem with a database of about 400 links.