If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > copy posts data into vbulletin backup (was "I need Help!")

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-17-07, 14:18
THE DON THE DON is offline
Registered User
 
Join Date: May 2007
Posts: 8
copy posts data into vbulletin backup (was "I need Help!")

Hello friends, I am new to this forums. I am having a Vbulletin Board installed. Unfortunately, my DB got corrupted. But I have the back up of the corrupted and of the normal DB. I managed to copy the values of new users registered after the backup date. But I want to cope one table which contions all the post data, so that the posts which were made after the backup the date.

that table name is userposts

I just want to copy this table and want to instert it into the DB which I backed up. I am sure that this table is ok and not corrupted.

Any help would be great!
Reply With Quote
  #2 (permalink)  
Old 05-18-07, 03:43
aschk aschk is offline
Registered User
 
Join Date: Mar 2007
Location: 636f6d7075746572
Posts: 770
INSERT INTO `backupdatabase`.`userposts`
SELECT * FROM `corrupteddatabase`.`userposts` WHERE ID NOT IN (SELECT ID FROM `backupdatabase`.`userposts`) AND `corrupteddatabase`.`userposts`.Date > '2007-05-01'

n.b. the above query limits the old resultset to a short while ago (2007-05-01) because I suspect you don't really want to test against the whole table (probably quite large) and your db corrupted recently so you should only bring back results that were recent.

Because I don't know the layout of your table for the userposts (nor can I be bothered to look it up for BB) so, the ID and Date fields I have used in the above query are quite possibly wrong and will need to be altered to whatever values you need.
Reply With Quote
  #3 (permalink)  
Old 05-18-07, 03:47
THE DON THE DON is offline
Registered User
 
Join Date: May 2007
Posts: 8
I can PM you both the databse if you can do that for me.
Reply With Quote
  #4 (permalink)  
Old 05-18-07, 05:42
aschk aschk is offline
Registered User
 
Join Date: Mar 2007
Location: 636f6d7075746572
Posts: 770
Yup not a problem.

I can test it here locally and let you know the query you will need to execute.

Reply With Quote
  #5 (permalink)  
Old 05-18-07, 06:05
THE DON THE DON is offline
Registered User
 
Join Date: May 2007
Posts: 8
Actually I am not a DB man. I am j ust installing and managing vBulletin. So th ats why dont want to take the risk. Sending you the links of DB backups. Thankyou and waiting for your reply!
Reply With Quote
  #6 (permalink)  
Old 05-18-07, 07:09
aschk aschk is offline
Registered User
 
Join Date: Mar 2007
Location: 636f6d7075746572
Posts: 770
I think I have just demonstrated a good example of social engineering. I now have the database(s) in question with usernames/email address/etc.

Granted the passwords are hashed/encrypted but it wouldn't take long to unhash them using the salt that is contained within the database once I find out what algorithm is used in the PHP for VBulletin.

DON'T hand out sensitive information over the internet in this fashion. Luckily for you I am honest chap and have no intention of utilising this information for "evil" purposes.

I will get back to you with your query shortly.
Reply With Quote
  #7 (permalink)  
Old 05-18-07, 07:12
THE DON THE DON is offline
Registered User
 
Join Date: May 2007
Posts: 8
I know that, but our board doesnt contain that much sensitive matter. Thats why I gave u the DBs without thinking abt the risk. But thanx for the helping hand.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On