Our production Moodle has been around for many years going all the way back to 1.9. We are now at 2.9.2 and have upgraded the same database along the way. We have been running into more and more random errors over time and I think our database might need to be rebuilt. I get the feeling that over the years the upgrade process has missed records and/or we are building a collection of orphaned records.
An example would be an error backing up and restoring courses. Turned out to be the stamp and version fields for mdl_questions was empty on a lot of the questions (Something that should have been taken care of during an upgrade).
It may be time to rebuild the database however all the documents I can find just cover migration. Is there an easy way to start over with a fresh Moodle that will fix all the records that are imported? It seems a simple MySQLdump and import will not accomplish this.