Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
  #1  
Old 10-27-2016, 02:38 PM
TheAllusionist TheAllusionist is offline
 
Join Date: Apr 2005
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Database Query to run to restore Thread Post

Yesterday it appears that when I installed a jFusion module in Joomla to read vBulletin 4 latest post that it took one thread (most popular one on site of course) and put me (adminsitrator) as the last and only post in the thread all the way back to around 3/26/2014.

So I contact the collocation facility that host my server and that I pay monthly for extra storage backup to revert the database and they get back to me and say, apparently things haven't been backing up for a long time and what we do have seems corrupted. Well the last backed up database for vBulletin I have is from 12/15/15 and it doesn't seem to want to work, could be just some new or updated plugins, etc. are causing a problem, but if I did get it to work, who knows if something somewhere not readily noticeable is wrong.

So I would like to run a query to update the database tables with that last database for the thread " Forum: Architectural Designs - On the Drawing Board (id: 23)" and restore what I can at least and then I will delete the ones I can't do anything about. Could I get some help on how to track down in the SQL file the information I need and the query on the database that I need to run to install it? I have of course backed up my current database.

Site is 3dallusions.com Thanks in advance,

Russell
Reply With Quote
  #2  
Old 10-27-2016, 02:40 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So if I understand you correctly, you have a thread that had all of its posts removed and you want to restore the posts of that specific thread again from a backup database?
Reply With Quote
  #3  
Old 10-27-2016, 03:01 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Take a look at this:

Restoring a thread - http://www.vbulletin.com/forum/showt...1#post1845274:
Quote:
Originally Posted by Lats
Try this, restore the backup to a different database and using the operations tab in phpmyadmin, rename the thread and post tables to something with a number on the end (post7 and thread7) then copy those 2 tables to the live database.
Run the following queries changing 777 to the threadid of the deleted thread.
Code:

INSERT INTO thread
(SELECT *
FROM thread7
WHERE threadid = 777)

Code:

INSERT INTO post
(SELECT *
FROM post7
WHERE threadid = 777)
DO NOT do this on your live site first!!!! Do it on a test site to see if it works. There is nothing above about restoring any attachments, so you will need to live without those (if they were stored in the database, then you may be able to write the queries for those). After you do it on a test site and verify everything works, then do a backup of your live site. Only after backing up your live site should you do this query there.
Reply With Quote
  #4  
Old 10-27-2016, 03:12 PM
TheAllusionist TheAllusionist is offline
 
Join Date: Apr 2005
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dave, yes and Lynne thanks. Attachments are files as my site is all about graphics and database would be huge, as it is it is 150 megs.
Reply With Quote
Reply

Thread Tools
Display Modes

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 02:31 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.04179 seconds
  • Memory Usage 2,181KB
  • Queries Executed 11 (?)
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_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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_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