Recover a deleted Sharepoint site collection from SQL backup (2007/2010)

Lets assume you have NOT been doing Sharepoint site collection backups but you do have SQL database backups. Either the Sharepoint front end web server has died and you have reinstalled a new copy of Sharepoint without your sites loaded:

1. Create a new SQL database & restore your backup into it.
2. At the command prompt use stsadm.exe to add the content database to your new site:
stsadm -o addcontentdb -url http://yourwebapp:port -databasename yourcontentdb -databaseserver yoursqlserver
3. Perform an IISRESET
4. Your all done, load the url and bath in your awesomeness!

Jason Vigus