Recovering site collection from database backup with STSADM
December 13, 2007
Mauro Cardareli posted a cool way to recover a deleted site collection using STSADM.exe with addcontentdb operation. This operation was added in WSS v3 version of STSADM to help in upgrade scenarios (reattaching WSS v2 databases for upgrade) and to create brand new empty content database from command line. Nice side effect is that you can use it to attach previous version of an existing content database, and it will “move” all your site collections there.
Be careful, though: by doing this, you are reverting all site collections hosted in this database to the last good backup state. This means if you any site collections there except the one deleted, odds are some changes will be lost for other sites.
By the way, you can mitigate this risk, by using third-party tools that allow granular SharePoint restore from full SQL backup. (Usual discloser here: I work for Quest and this is one of the products I work on.) One of the beauties of this solution is you can retrieve only the objects you want from a content database backup, even if the backup was created before you install the tool.
Technorati Tags:
sharepoint, granular recovery, Quest, SQL, stsadm.exe