MyBB Community Forums

Full Version: Database backup help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hi,
I deleted several threads on my forum by accident. Now, I have a backup made on the 28th July when the threads were still there. However, how can I just put the threads in the forum without sacrificing posts made since the backup was taken?

Thanks Smile
Just upload mybb_threads table to the database and they should be added. Smile
(2011-08-24, 01:51 PM)crazy4cs Wrote: [ -> ]Just upload mybb_threads table to the database and they should be added. Smile

But will the newer threads still be there? And how do I only upload the mybb_threads table?
restore those tables under different names (e.g. backup_threads instead of mybb_threads), same for posts, and then

INSERT INTO mybb_threads (SELECT * FROM backup_threads WHERE tid IN (1,2,3));
INSERT INTO mybb_posts (SELECT * FROM backup_posts WHERE tid IN (1,2,3));

replace 1,2,3 with the list of thread ids you deleted and then run recount&rebuild afterwards
Sorry for being a bit thick haha, but how do i restore the tables? by uploading them to phpMyAdmin and then renaming then to backup_threads etc?
No probs, done that now, but when I try and run the SQL queries, I get error 1136:

#1136 - Column count doesn't match value count at row 1
(2011-08-24, 04:10 PM)Radebe Wrote: [ -> ]Sorry for being a bit thick haha, but how do i restore the tables? by uploading them to phpMyAdmin and then renaming then to backup_threads etc?
No probs, done that now, but when I try and run the SQL queries, I get error 1136:

#1136 - Column count doesn't match value count at row 1
Make sure TID (Thread id) was correct.

It was correct.
so for some reason your tables don't have the same structure (update mybb in between?)

so instead of * you'll have to specify values (a,b,c) select a,b,c

or change the structure of the backup table to match the currently used table
(2011-08-24, 08:29 PM)frostschutz Wrote: [ -> ]so for some reason your tables don't have the same structure (update mybb in between?)

so instead of * you'll have to specify values (a,b,c) select a,b,c

or change the structure of the backup table to match the currently used table

sorry, bit of a newbie to this haha

so how do i specify the values?
Bump, still havent worked it out
Pages: 1 2 3