The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
Quote:
This should restore all posts removed from the livedb that are in the backupdb that do not belong to threads that still exist on your live db. (i.e. if you deleted a post from a thread but the thread is still on the live db it won't be restored) Code:
INSERT INTO libedb.post (SELECT * FROM backupdb.post WHERE NOT threadid IN (SELECT threadid FROM livedb.thread)) Code:
INSERT INTO livedb.thread (SELECT * FROM backupdb.thread WHERE NOT threadid IN (SELECT threadid FROM livedb.thread)) |
Благодарность от: | ||
RichieBoy67 |
#12
|
||||
|
||||
Thanks,
The issue though is not missing or deleted threads.. They are there, it is missing posts only. I am not sure what happened to them but it was done using impex. Bottom line it is only posts that need to be imported. Thanks so much for your help. |
#13
|
||||
|
||||
Then just use the first query but take out the NOT in the where clause.
|
#14
|
||||
|
||||
Quote:
I will try this today. --------------- Added 06 Sep 2015 at 05:40 --------------- Ok, this is what I ran on the live database: PHP Code:
PHP Code:
|
#15
|
||||
|
||||
Three things: first I think you want to be inserting into your live db not your backup db, second I think you want the threadid to be the ones from the live db (i.e. only grab posts for threads that are still in the live db), and third the reason I think you're getting the error is that you might require backticks or double quotes around your db name for the backupdb.
|
#16
|
||||
|
||||
yes, those are both back ups.. that was the correct database as it is the back up of my main database. The other one is the back up of the back up.
I will try with the quotes. --------------- Added [DATE]1441600859[/DATE] at [TIME]1441600859[/TIME] --------------- Actually I think you may be right either that or I changed the names incorrectly when I copied it here. --------------- Added [DATE]1441602633[/DATE] at [TIME]1441602633[/TIME] --------------- I am not sure what I am missing but have tried everything and nothing works..keep getting the syntax error. I believe we need asterisks. |
#17
|
||||
|
||||
If that's the query there's a problem with your tables, both the source and destination post tables are the in the same db. So you're inserting all posts from db1 into db1 if the threads are in db1, which doesn't make any sense, so that's likely what the syntax error is about. If you're restoring posts, then you have to restore from one db into the other based off the threads in the destination db.
(i.e. restore posts into db1 from db2 where the threads are in db1) Your current query is doing restore posts into db1 from db1 where threads are in db1, which won't accomplish anything. |
#18
|
||||
|
||||
Yes, I changed the databases and still got the errors.I went by your directions.
PHP Code:
Your instructions: PHP Code:
|
#19
|
||||
|
||||
If anyone can help me finish this I will glady donate a few $.
Keep in mind these are both back up databases that are live in phpadmin. I did not want to run this on my live site until I get it working. Don't let the "backup" in the database names confuse you. August is the back up.. the other is the one I am trying to add tyhe posts too. Thanks |
#20
|
||||
|
||||
Try changing the query to insert ignore, as insert ignore will ignore constrains like primary key constraints.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|