I've been running 2.2.7.
Try to upgrade to 3.1.2. Got the same error as
http://forum.civicrm.org/index.php/topic,11953.0.html . I then copied what I thought was my backed up database back into the sql directory and tried again, and and got
"Database check failed - it looks like you have already upgraded to the latest version"
At that point I went digging and realised that I've been backing up the wrong database for several months

So - my question is: where do I start in order to try and get a partially upgraded database back into a state where i can upgrade it successfully?
Thanks