Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-16-2013, 02:55 PM
TheAllusionist TheAllusionist is offline
 
Join Date: Apr 2005
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default SQL Partial Imports - Users

My sites have really been hit hard this year by hackers and it has really worn me down to a point where I am tired of putting tons of effort into retrieving them back completely to where they were before attacks, but I have a question regarding importing partial SQL files into my vBulletin database.

This last attack was my forums and to get around all the malicious script uploaded into and overwriting my files, I did a fresh install and imported a bit older database that I thought was good. Things aren't bad accept some users had corrupted member information and through repairing the database etc. some are missing. I however have a user only vBulletin export SQL file that I would like to just import into the database, but through MySQL I get errors or time outs. Should be over 25,000 users in the file maybe that is big for uploading into a database, not certain.

The file was an export from MySQL of my user data, so I thought it would import right in, but it isn't seeming to work.

File Imports report:

Quote:
MySQL said: Documentation
#1062 - Duplicate entry '1-28' for key 'PRIMARY'

If I run a Query I get:

Quote:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


So if anyone could help me with suggestion on if this can be done I would appreciate it, I am an architect not a server or database expert. I am just trying to get things working and house keeping done before everything is moved to a new server I am purchasing.

Thanks in advance for your time and help.

Russell
Reply With Quote
  #2  
Old 10-16-2013, 04:15 PM
findingpeace's Avatar
findingpeace findingpeace is offline
 
Join Date: Nov 2011
Posts: 268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Russel, I think this is because you already have an existing User table, so it isn't importing. My guess would be that you need to first delete/truncate the entire user table, and then import the other one.

Of course, back up before attempting that!
Reply With Quote
  #3  
Old 10-16-2013, 08:37 PM
TheAllusionist TheAllusionist is offline
 
Join Date: Apr 2005
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, I was hoping there was some syntax I could use to just update missing data. I guess not, thank you for your help.

Regards,

Russell
Reply With Quote
  #4  
Old 10-18-2013, 02:03 AM
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
Posts: 969
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheAllusionist View Post
Thank you, I was hoping there was some syntax I could use to just update missing data. I guess not, thank you for your help.

Regards,

Russell
You could but it might be more complicated. You'd need to import the data into a temporary table (i.e. temp_user) and run a query like the following:

Code:
insert into user (select * from temp_user where userid not in (select userid from user));
Reply With Quote
  #5  
Old 10-21-2013, 04:55 PM
TheAllusionist TheAllusionist is offline
 
Join Date: Apr 2005
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

squidsk, thank you very much, very helpful!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:13 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04744 seconds
  • Memory Usage 2,200KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete