Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Corrupted links.db after upgrade to 2.0, plus ISP says nph-verify.cgi kills his CPU

Quote Reply
Corrupted links.db after upgrade to 2.0, plus ISP says nph-verify.cgi kills his CPU
After upgrading to Links 2.0, and then running the 'upgrade.pl' as said in the Links Upgrade file, my links.db (1300 links) became corrupted. It seems the Links 'upgrade.pl' program removed the 'NULL' comments, but completely re-arranged other things too.

I tried using Microsoft's Access to fix the bad link.db, and to verify in linksid.txt, but still my links.db was too corrupted. And due to my ISP having a disk quota on me, and a cron job that is copying over raw log files to my directory, I have no current backup either.

A last note, my ISP says that the 'nph-verify.cgi' script about killed his server. I find this a bit too much considering he has over 200 other hosts on his servers. My verify script ran like 2 minutes max.

In any event, my links.db file is dead and I'll have to start over.

Quote Reply
Re: Corrupted links.db after upgrade to 2.0, plus ISP says nph-verify.cgi kills his CPU In reply to
This just goes to show the importance of always backing up critical files, such as your data directory files, before making any upgrades.

The upgrade.pl script does not touch the links.db file at all. Instead, it creates a new file called links2.db. Once it is created, you need to manually rename it to links.db in order to use it. Before doing so, it is always a good idea to rename the original links.db to links_org.db (or something similar) so, if things go wrong, you have the orginal file and can copy it back to links.db.

I do sympathize with your plight but there just is no substitute for backups of some type. What I don't understand is this:

Quote:
a cron job that is copying over raw log files to my directory, I have no current backup either.

How can the copying of raw log files affect the backups that Links creates in your admin/backup directory? They certainly would not have the same name. If you are paying money to this ISP, I would start looking for a new one.
Quote Reply
Re: Corrupted links.db after upgrade to 2.0, plus ISP says nph-verify.cgi kills his CPU In reply to
This particular ISP I was using (I use a few of them and this one I'm getting rid of), had a cron job copying over my raw log files since the beginning of the year. Over 30 megabytes. Since I didn't have permission to alter the cron job, and asked him repeatedly to fix, all of my scripts and backups aborted leaving me every day with a mess.

I do make backups and understand the importance in them, but my backups could not write to the disk and earlier the ISP erased my Links backup. Totally unheard of.

However, if the upgrade.pl doesn't touch my links.db file (doesn't it remove all the NULL information?), then what possibly happened that all of my links were completely re-arranged out of order and many corrupted? I'm guessing something to do with the disk quota exceeded.

Thank you for replying, I do appreciate it.

Quote Reply
Re: Corrupted links.db after upgrade to 2.0, plus ISP says nph-verify.cgi kills his CPU In reply to
 
Quote:
I do make backups and understand the importance in them, but my backups could not write to the disk and earlier the ISP erased my Links backup. Totally unheard of.

My god, if your ISP is erasing your own files without your permission, ditch them quick!

Quote:
all of my links were completely re-arranged out of order and many corrupted

Were they re-arranged just in the html? Is the links.db file still ok? I could see this happening if you tried to run nph-build.cgi using a Links 1.11 database, however I don't think it would corrupt the actual links.db file.

Quote:
A last note, my ISP says that the 'nph-verify.cgi' script about killed his server. I find this a bit too much considering he has over 200 other hosts on his servers

Is this version 1.11? If so, set $db_fork to 0, it's a little buggy on some systems. If it's 2.0, then there shouldn't be a problem.

Cheers,

Alex
Quote Reply
Re: Corrupted links.db after upgrade to 2.0, plus ISP says nph-verify.cgi kills his CPU In reply to
I was using Links 2.0. The links.db file was completely out of order. For example, the last ID was 35 but should have been 1300, so everything was mixed up with a number of links corrupted. I have not a clue how this happened. But I noticed it after I ran upgrade.pl and then added 1 new record using the Admin menu, which worked, and then re-building.

I'm not saying upgrade.pl did it. It could have been a number of things. But since my ISP had deleted my Links backup files, I had no backup copy to play with. I was able to fix the links.db using Access to some degree, but most of the database was shot.

Live and learn. Smile

Quote Reply
Re: Corrupted links.db after upgrade to 2.0, plus ISP says nph-verify.cgi kills his CPU In reply to
Is there, by chance, a links2.db in your data directory? If so, then that is the links database created by upgrade.pl that needs renaming to links.db.
Quote Reply
Re: Corrupted links.db after upgrade to 2.0, plus ISP says nph-verify.cgi kills his CPU In reply to
Have seen this happen before in two different cases (unfortunately to me)..

A) if you exceed your disk limit on some ISP's and attempt to write (add/modify/delete) to the database it truncates/mixes up the data...

B) CGI is just being 'funky' (or so my ISP provider would like me to believe) when you attempt to write to the database and bombs again truncating or missorting the data.

Lots of fun :S


------------------
WebMistress@FreeCards.org
http://www.freecards.org