Best ways to restore document library from the database (SQL server Content database). RRS feed

  • Question

  • Hi All,

    In Moss 2007 server , Document Library deleted from recycle bin also

    Anyone can you please suggest me the best ways to restore document library  from the database (SQL  server Content database).



    • Moved by Pengyu Zhao Thursday, August 9, 2012 8:38 AM pre 2010 (From:SharePoint 2010 - General Questions and Answers)
    Wednesday, August 1, 2012 6:59 PM

All replies

  • Have you checked the recycle bin of the site and site collection that the library was in? SharePoint is going to capture a deleted document library in the recycle bin for around 28 days total, so that may be an option...

    I can think of four different approaches you can take to get the document library out of that backup with SharePoint 2007:

    1. Assuming that you have a current version of that backed up database already in your farm, you can restore the full content database to SQL Server, then remove its current version from your farm and then attach the restored content database to the farm to replace the current one. The drawback to this is that you'll lose all changes that were made in every site collection within that content database in order to retrieve the document library, which may not be acceptable.
    2. Also assuming that you have a current version of that backed up database in your farm, you can restore it to SQL, detach the current database from the farm, then attach the restored one and then use the STSADM command line tool's Export operation or the Save Library as a Template (with Content) option in the Site Settings menu to export a copy of the library out of the restored database. Then detach the restored database and re-attach your current database and import the library into it. This will require some downtime, but allows you to extract the library from the restored database without losing all other changes that had happened since it was deleted or having to stand up a separate recovery farm.
    3. Restore the content database and attach it to a separate SharePoint 2007 farm, then use the STSADM command line tool's Export operation or the Save Library as a Template (with Content) option in the Site Settings menu to export a copy of the library out of the recovery farm and then import that library into your current farm.
    4. Either purchase a full version or download a demo of a third party SharePoint backup/restore tool, and use it to extract the document library from the database backup. I think Quest's tool does this, and there's a good chance that AvePoint's and Idera's may as well. You'll have to check each vendor's website to be sure.

    Please note, you cannot restore the content database backup to a different name and attach it to the same farm if you already have a current version of that same content database live in your farm, which is why I've got the steps for detaching and re-attaching the databases in some of those items above. Even though the databases could have different names, there is important data in those databases that must be unique for SharePoint 2007 to be able to use them, so you can't have the same identifiers in two databases in the same farm because they wouldn't be unique.


    MCITP and MCTS: SharePoint, Virtualization, Project Server 2007
    My books on Amazon: The SharePoint 2010 Disaster Recovery Guide and The SharePoint 2007 Disaster Recovery Guide.
    My blog: My Central Admin.

    Wednesday, August 1, 2012 7:28 PM

    Hi rclgoriparthi,

    Is the document deleted from user Recycle bin or the Site Collection administrators Recycle bin? If it is with users than you might be little lucky to recover from the Site Collection Recycle Bin. If the delete is from the Site collection Recycle Bin then you cannot get the document back, but if you are SharePoint SQL server databases (Content Database) are periodically backed up then you might recover the document from that previous SQL server backup file. You need to restore the SQL back up to another farm or environment, then using DBATTACH you can attach the content databases to the another farm and from there you should be able to recover the document. Are you on SharePoint 2010 or MOSS 2007?  


    Skancharla MCTS http://sharepointsrikanth.blogspot.com/

    Wednesday, August 1, 2012 7:30 PM
  • Are you using 2007 or 2010?

    Cause 2010 by attaching DB to SQL Server, you can browse to this library from Central Administration without restoring the site.

    But is it 2007 or 2010? if 2007 can you migrate to get your library from Central Administration. Or if it is 2007 can you restore this DB and create web app from this DB to see the site.

    You are saying deleted from recycle bin, if yes either 2007 or 2010, I believe there is no way.

    Mai Omar Desouki | Software Consultant | Infusion | MCP, MCTS, MCPD, MCITP, MCT Microsoft Certified Trainer & MCC Microsoft Community Contributor | Email: mai_omar_86@live.com | Blog: http://moresharepoint.wordpress.com

    Wednesday, August 1, 2012 7:31 PM