MyBB Community Forums

Full Version: sql error when trying to import a backup through phpmyadmin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Open the posts backup file and scroll all the way down to the bottom. Check if it contains the posts table completely or not (number of lines that start with INSERT INTO mybb_posts should be identical to number of posts). If it's complete, just delete the <style ...> etc. crap out of it which should be at the end of the file. Then import it.
(2011-07-24, 08:02 PM)frostschutz Wrote: [ -> ]Open the posts backup file and scroll all the way down to the bottom. Check if it contains the posts table completely or not (number of lines that start with INSERT INTO mybb_posts should be identical to number of posts). If it's complete, just delete the <style ...> etc. crap out of it which should be at the end of the file. Then import it.

mybb shows 40,817 posts, the backup posts file INSERT line ends at 38,986 and the original phpbb forum shows 38,941 posts.

if I take just the actual text within the posts backup file and minus out the stuff before and after the INSERT INTO, there are 38,941 posts...so it does look like it copied them over correctly, but why is mybb showing almost 200 more posts?
Assuming the phpBB count is correct, that'd be a complete backup then.

MyBB counts go wrong sometimes, try Admin CP -> Tools -> Recount & Rebuild after you import it into your new board.
(2011-07-24, 08:18 PM)frostschutz Wrote: [ -> ]Assuming the phpBB count is correct, that'd be a complete backup then.

MyBB counts go wrong sometimes, try Admin CP -> Tools -> Recount & Rebuild after you import it into your new board.

ok, just deleted the style stuff at the end and I'm trying to import it again. I'll let you know how it goes.

edit- just finished, and it executed without any errors!

ran the recount & rebuild and it's still showing 40,816 posts..hmn..any ideas?
Not really, but a wrong post count is hardly a critical error.

If you open 10 threads you didn't open before and recount then, does the post count decrease by 10?
(2011-07-24, 09:04 PM)frostschutz Wrote: [ -> ]Not really, but a wrong post count is hardly a critical error.

If you open 10 threads you didn't open before and recount then, does the post count decrease by 10?

it did increase by 1 post when I opened a thread I never opened before and the recount seems to of knocked the posts down from 40,817 (note, it increased by 1 from 40,816) to 40,794.

when I marked all forums read, and ran the recount tool, the posts are staying at 40,794.
Well, my guess was that it could be a wrong firstpost entry for threads in the threads table (which I think gets corrected when you view the thread). But this actually refers more to the number of replies of a thread, not the post count. Although it would still cause a wrong post count if the number is derived from the replies entry in the threads table.

Counters. Love them. Smile

(2011-07-24, 10:38 PM)frostschutz Wrote: [ -> ]Well, my guess was that it could be a wrong firstpost entry for threads in the threads table (which I think gets corrected when you view the thread). But this actually refers more to the number of replies of a thread, not the post count. Although it would still cause a wrong post count if the number is derived from the replies entry in the threads table.

Counters. Love them. Smile

not a huge deal if the forum is working correctly as it appears to be.
Pages: 1 2