Recover Site collection to a Farm using only the SQL Content Database from a different farm

Hi all,


first of all, it has been a while since I wrote something on my blog here. Well, here I am again.


This time a had an issue that after I migrated a bunch of site collections (about 200 site collections) from farm1 to farm2, I realized that I had forgotten one site collection. Of course by the time the owner of the site found out, farm1 had been completely decommissioned and there was no way to get it back online. 


The only thing I could get was a backup of the SQL databases from our SQL guys. Well, after a little research on the net, etc. I managed to recover the site collection quite easily.


Basically this is what I did:


First of all I used a test MOSS server that I have running here in the same Active Directory environment (for the permissions sake). If you don’t have one running, then install one and have it on the same Service Pack as the original farm


1. Restore the content Database containing the site collection to the database server of the test MOSS server. (or have it restored by your SQL guys, like I did)


2. Simply create a new Web application, which does not need to have the same name, port, etc. as the original web application in Central Administration and have that Web Application point to the restored database instead of creating a new database.


3. At this point you can already access the site using the parameters of the new web application. it will also show up when you use stsadm -o enumsites for you web app or show up in the Site Collection List of your web application in Central Admin. In my case I had an error at first when loading the site the first time, but then I never saw it again.


4. Now, backup the site using stsadm -o backup -url <your url> -filename <yourfile.dat>


5. and recover it on your farm2 environment with stsadm -o restore -url <your url> -filename <yourfile.dat>


that’s it. Sounds simple, is simple and it worked for me [H]