XF 2.2 My Last Hope

Shane Greer

Active member
Ok so it appears I have mucked up and lost 12 years of forum work - this I guess is my last chance of trying to find a fix.

Long story but here goes.

  • I decided to upgrade to v2.3.
  • Error pops up in admin I need Mysql8.0 - Im only running 5.7
  • I go to my server hosts - they can upgrade my servers to 8.0
  • I jump through the hoops - site is migrating. I will need to change db host when fully migrated.
  • 2 weeks later site still shown as migrating. I contact server support and they 'fix' the migration quickly.
  • I edit my src/config file to point to my new database.
  • Go back on my site - Unexpected Error
  • Page source shows - <!-- MySQL statement prepare error [1146]: Table &#039;fgmnewforum.xf_user_remember&#039; doesn&#039;t exist -->
  • I go back to server hosts and enter the phpmyadmin and correct - no table there.
  • I go to server support and advise them the migration has not worked.
  • They say it is a xenforo problem.
  • I raise a ticket at xenforo - they say it is a migration error.
Worst part is I dont have a back up. Never thought about it at the time... yes ... my bad. Is there anyway I can rebuild those tables so they are in the new db?

Any help or opinions greatfully accepted.
 
I would not delete anything in the existing database. Download what's there, including Xenforo.

If it's a VPS where there's access to the file system:
1. Do not do any other work on this server, as it risks overwriting deleted tables.
2. I've recovered deleted database files in the past (hacker deleted most tables on a client's machine). So recovery might be possible.

VPS or not, if most tables still exist, especially posting and thread tables.... the user tables can be rebuilt. With the post table, the following can be rebuilt:

1. Registration date using the first post date.
2. Last active date using their last post date.
3. Number of posts.
4. User name.

The password and email fields will be lost and need to be filled with dummy data, but at least you'll have the forum content back.

Do not do anything further on this server! Odds are you'll only make any data recovery more difficult or impossible!

Get another host, and do all work there, after you've had someone recover/rebuild what they can.
 
Sadly Justin who had a look earlier said this 'Well that database is of no use as it is missing Users information completely'.

So long as most other tables exist (the post and thread tables being most important), there's hope.

Users will need to re-register. Those you trust who can tell you their email and username, you can update the rebuilt user with this information so they can keep their content.
 
I can still rebuild so long as posts is there. Threads are gone since it's after xf_searchindex, but I can rebuild everything in xf_thread except

1. Sticky/locked/deleted/moderated status
2. View count
3. Tags
4. Possibly vote score

Titles I can "somewhat" rebuilt, using the first sentence of the first post.

This is not a perfect solution, but it covers the most important thing: not losing all the content!

When you said search index, I know what probably happened because I've seen this before. Search index often takes up the most disk space. During the migration, there's a good chance disk space ran out and the MySQL connection doing the migration crashed.

I have to go pickup my son from work and will DM when I return.
 
Anyone running a site should ALWAYS, ALWAYS take a backup regularly and definitely before doing any server work or XF upgrades.
+1, +1 and more +1.

When I initially set up my site on AWS, the very first prerequisite was for a firewall in front of my server blocking all access from the internet except myself while I built and patched it so no hacker could mess it up. Very easy to do with the AWS built-in firewall as it blocks everything by default.

The second thing was to sort out a comprehensive backup regime. I then tested it by deleting both test servers (XF and MySQL) and restoring them successfully from the backup. Only then did I start to develop the site further with initial users, categories, themes etc.

Backups are like oxygen: you die without one, it's just a matter of time.
 
+1, +1 and more +1.

When I initially set up my site on AWS, the very first prerequisite was for a firewall in front of my server blocking all access from the internet except myself while I built and patched it so no hacker could mess it up. Very easy to do with the AWS built-in firewall as it blocks everything by default.

The second thing was to sort out a comprehensive backup regime. I then tested it by deleting both test servers (XF and MySQL) and restoring them successfully from the backup. Only then did I start to develop the site further with initial users, categories, themes etc.

Backups are like oxygen: you die without one, it's just a matter of time.

Correct, I figured they were copying my database across to a new database as all through the process both db's were there and visible and if need be I could just roll back to the old database - nope - I was wrong.
 
  • Like
Reactions: FTL
Sadly Justin who had a look earlier said this 'Well that database is of no use as it is missing Users information completely'.
In the past I've rebuild forums with nothing but HTML (from Google cache and other sources) ... there is always a way to recover (so some extend).

You need to get someone who really knows XenForo inside out access to the server.

If all tables up to and including xf_search_index are there and intact it is possible to rebuild pretty much all important content (except user acounts).

Titles I can "somewhat" rebuilt, using the first sentence of the first post.
Thread titles are in xf_search_index as is deletion status, node id and thread type.

That being said, the host really should have backups
 
Last edited:
Whats Going On Hello GIF by American Kennel Club
 
Thanks for all your help and assistance guys. Thankfully after a bit of a battle my hosts found my backup db and reinstalled everything after their migration flunked it up.

All good now.

After all the stress, I think I will delay upgrading to v2.3 for the moment, but at least I now have the correct mysql version for when I do take the plunge.

And remember... always, always, always back up your db!
 
Geeze, I just read through this thread. What a mess! Whether they fixed it or not, I'd still switch hosts. All this time and stress, could have been avoided if you had even a fairly decent host with techs who know what they're doing.
 
Back
Top Bottom