drupal database & code out of sync I've lost the PHP installation of a Drupal 7 site just before a lot of updates were about to be applied. I still have the Drupal database.

If I install a current version of Drupal, it may be out of sync with the database (missing columns that were added by some update etc).

So, how can a new Drupal installation be grafted onto an old database?
Treat this as an upgrade. You won't have a problem with missing columns, because those are in your database. You'll have a problem with missing plugins to access those columns.


First, of course, back everything up. 
Then install Drupal. It makes
sense to follow @Schnippy's hint and look in the database for the
version number, and install that version of Drupal. Otherwise,
install the current version; it will tell you if it needs to update the database.
Look in your database (hopefully you have phpMyAdmin available) for tables created by plugins. Use that and your memory to reinstall any modules. You might also look at admin/reports/updates and see if it'll list your missing plugins.


Later, I recommend installing the Schema plugin, which will report any mismatches between your modules and database tables. This gets reported on the Status Report page and is wonderful when developing a custom module.

If you lost your images and file uploads from your theme or site/default/files directory, you may be out of luck for that content. Good luck!