Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Restoring the database
Avatar
Somjai Siangwilai
Member
sp_UserOfflineSmall Offline
Dec 9, 2016 - 7:25 am

Help panicking! I updated my theme on a staging site. When I reloaded the staged files back most of the forum posts are missing. I have a backup of my complete database and a copy of the old content folder. 

What I have attempted was to import my complete backup db into a new empty one I created in Phpmyadmin. The I dumped all the tables but 37 related to SimplePress. I exported those then went to my site db and dumped the same tables and imported the SimplePress export file. But I see the same amount of missing posts but I checked the tables of the imported tables and those tables show all the post count.

I am baffled why all the posts don't get imported each time. Any clues or suggestions how I can get my forum back??

Thanks in advance.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 9, 2016 - 7:36 am

Unless you did something specific to remove data from the tables then forum posts can not get lost any more than your blog posts can. I do not understand why you are restoring anything of the tables were in thew database in the first place. You seem to making more work and potential trouble for yourself that way,.

So - this sentence seems to be the actual important one:

I updated my theme on a staging site. When I reloaded the staged files back most of the forum posts are missing.

What theme are you talking about here? WP? SP? And what does 'most of the forum posts' actually mean? I need some detail.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Somjai Siangwilai
Member
sp_UserOfflineSmall Offline
Dec 9, 2016 - 8:02 am

Sorry for being vague. I wanted to change themes off my live site. Over 465 posts and thousands of forum posts. So I paid and used a paid plugin called stage coach. Basically what it does is make a clone of my live site ( the whole site of which my forum is one part) on their own servers and when I have completed the theme change and all the other changes needed to go live they compare the new files to the old ones and update the live site to reflect the new changes. I did this manually by using FTP to upload the generated files (one sql and one zip). The site came up fine with the new theme but when I go to the forum I have 2011 and 2012 posts but that is all plus of course the data is also missing for the "last post" and I am not sure what else is missing. 

But as I said I backed up my whole db before the import in case something went wrong. I could just revert my whole site back I guess but all seems good except the simple press data. This is where I started my OP. 

When I reloaded the staged files back most of the forum posts are missing (everything past 2012). I have a backup of my complete database and a copy of the old content folder. 

What I have attempted was to import my complete backup db into a new empty one I created in Phpmyadmin. The I dumped all the tables but 37 related to SimplePress. I exported those then went to my live site db and dumped the same tables and imported the SimplePress tables db export file. But I see exactly the same results with the same amount of missing posts (everything after 2012) but when I checked the tables of the backed up and imported tables, those tables show all the post up to the most recent. 

I don't understand why all the posts showing in the wp_sfposts don’t get imported and each time they get abridged for some reason. I hope that maybe makes it a little clearer. Any clues or suggestions how to upload the backup sf tables successfully or what could be limiting the amount uploading. After all there are 128 pages of 30 entries in the table. Maybe somehow I have gone over a limiter or something. Any ideas? BTW thanks for your response.

Avatar
Somjai Siangwilai
Member
sp_UserOfflineSmall Offline
Dec 9, 2016 - 8:09 am

BTW there are actually 1,071 pages of 30 entries on each page in the backed up wp_sfposts db. But when imported each time there are only 98 pages of 30 entries. The rest don't get imported for some reason.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 9, 2016 - 8:10 am

if you are 100% certain that the database is truly missing records then the only thing I can think of is that as you are using phpMyAdmin this has quite a low MB file size when importing. When you click on the import button on the top menu it will tell you what the maximum SQL file size is that it can import. Perhaps that is the issue?

If so then you need to split the SQL dump file into smaller sections and import each one separately.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Somjai Siangwilai
Member
sp_UserOfflineSmall Offline
Dec 9, 2016 - 8:29 am

Thanks for your response. I was hoping you hit the nail on the head. But those 37 SF tables are only 15mb.... Arghh confused

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 9, 2016 - 8:42 am

Again - if you are 100% certain that the source database dump is complete then it might be worth looking at the first record/row that did NOT get imported to see if there is anything odd about it.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Somjai Siangwilai
Member
sp_UserOfflineSmall Offline
Dec 9, 2016 - 8:51 am

I want to compensate you somehow. You started me down the right path. That one table, the posts, was just over 50mb itself. So what was happening when importing was that the php was timing out. I dropped that one table and imported it by it self and after reloading the timed out page once I guess it completed the upload and all is good!!!

Anyway besides just saying "thanks" I can compensate you for your knowledge? I was sweating this!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 9, 2016 - 11:56 am

My compensation is not having wot worry about the problem any more 🙂
Glad it is resolved.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626