Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help
Author Message
kevinkap
Involved
Involved


Joined: Apr 22, 2006
Posts: 356

PostPosted: Thu Oct 19, 2006 2:39 pm Reply with quote

I have another odd issue. That seems to be my luck these days Rolling Eyes .
Anyhow, after restoring my site from a days previous cpanel backup, I now find that some db tables have been doubled or even tripled. I had this before and thought it was a bug in the Nuke League module that I use but it happend again and not only to that module but to the nuCalendar module's tables as well.

What would cause this? Is there an easy way to get back to the original structure?

_________________
Kevin Kappes 
View user's profile Send private message
fkelly
Former Moderator in Good Standing


Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Thu Oct 19, 2006 3:00 pm Reply with quote

Do you mean that there is two (or three) copies of the data in each table -- not that there are two or three copies of each table? I guess it must be the former but please confirm.

Normally, you would want to do a drop of all the tables before restoring a backup. The backup is likely to have a create table for each table and then a bunch of insert statements to reinsert the data. So without a drop I guess it's possible to reinsert the data several times.

Take a look at how your dump file is structured if you get a chance.

To fix it, first confirm all this and then probably you are going to need to do a drop before you restore. If you have phpmyadmin you can use it to select all the tables and drop them. If not you might need to add the drop table statements manually, e.g.,

Code:
DROP TABLE IF EXISTS `nuke_authors`;

CREATE TABLE IF NOT EXISTS `nuke_authors`


for each table.
 
View user's profile Send private message Visit poster's website
kevinkap
PostPosted: Thu Oct 19, 2006 3:08 pm Reply with quote

here is an example of what it did to the calendar table.

say there was a table with 12 rows of data, it had all twelve rows listed 2 or three times. IE 1data, 2data,3data etc, 1data, 2data, 3data, etc, 1data, 2data, 3data.

I understand to drop the tables, as I did not know that before, but why would it only duplicate some of them and not all of them?[/code]
 
kevinkap
PostPosted: Thu Oct 19, 2006 3:25 pm Reply with quote

actually I am using cpanel backup so it restores everything itself, I do not have to use the phpmy admin function. At least that is what I would think.
 
kevinkap
PostPosted: Thu Oct 19, 2006 3:39 pm Reply with quote

got it back to normal. thanks.
 
fkelly
PostPosted: Thu Oct 19, 2006 5:27 pm Reply with quote

Congrats. FWIW, if a field is key and unique then an insert won't duplicate the record it's in. That could account for what seemed like anomalous results. The records that were duplicated or triplicated probably didn't include keys and those that weren't probably did. Just a guess.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©