What I would have done — assuming the database is structured the way I think it is — is write a run-once PHP script that performs a process like this:
Code:
retrieve thread #'s and subforum association #'s from the threads table in the old DB
store that mess in an array
for each row in the array:
- find the row in the current DB with the same thread #
- set the subforum association # in the current DB to the one in that row of the array
Then it'd just be a matter of finding the leftover threads, the ones that were made since the backup, and putting them where they belong manually. I assume that could be done through the VBulletin control panel.
Now that we've already started running off the backup, though, it's gotten a lot more complicated, because now we've got all the posts and threads that have been made since the rollback, which have the same #'s as the lost posts. Off the top of my head I'm not sure what we'd do about those.