Unger Technologies - The Smart Choice for IT Consulting

Restore a SharePoint Site from a Database Backup

We recently needed to restore a SharePoint (WSS 3.0) site for a client using only a database backup file. We developed a procedure that should work for just about anyone.  This procedure would probably work for restoring to MOSS 2007, but we have not tried it.

We assume that you have a SQL Server 2005 backup of the SharePoint content database. We also assume that you are restoring to a different server than the original server, although either should work. Use the following steps:

  1. Copy the backup file to the new server and place in the directory where backups are normally kept. (This is typically in the location c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\backup).
  2. Restore the backup file. Click here for steps to accomplish this using SQL Server Management Studio.
  3. If you are restoring to a virtual server, this would be a good time to make a copy of the virtual disk (.vhd file for Microsoft Virtual Server or Virtual PC) file, especially if the database file is large. Otherwise, it might be a good time to make a backup of the physical server.
  4. Prepare to install Windows SharePoint Services 3.0 (WSS 3.0) on the server. Note that the WSS installer will install SQL Server 2005 Embedded Edition in the C:\windows directory. This directory and its subfolders cannot be compressed or the install will fail.
  5. Run the WSS 3.0 installer. Click Advanced. Click Standalone radio button. Click Install Now. Check the Event Log for any errors if the installation does not complete successfully. Reboot if requested.
  6. Run the SharePoint Products and Technologies Configuration Wizard. (Found in All Programs | Administrative Tools)
  7. Start the SharePoint 3.0 Central Administration application. (Found in All Programs | Administrative Tools)
  8. Click on the Application Management tab.
  9. Click on the Create or extend Web application link.
  10. Click on the Create a new Web application link.
  11. Scroll down to the Application Pool section and decide whether or not you want to create a new application pool and what account you want to run under. Make sure that whatever account you use has the necessary permissions on the content database that you are recovering.
  12. Scroll down to the Database Name and Authentication section. Enter the name of the server where your backup data is installed in the Database Server text box and the name of the database in the Database Name text box. Click OK.
  13. Click on the Application Management tab.
  14. Click on the Create Site Collection link.
  15. Make sure that the Web Application dropdown is pointing to the web application that you just created. Enter a title and pick the Blank Site template. Then enter an account to be the Primary Site Collection Administrator. Click OK.
  16. Make a note of the port number that is assigned to the new application. Then click OK.
  17. Click on the Site collection administrators link. Click the down arrow on the Site Collection dropdown and click Change Site Collection.
  18. Click the link for each site in the collection and make sure that the Primary Administrator is an account on the server or the server’s domain. (This is important if you are restoring to a machine on a different domain or to/from a standalone server.)
  19. If the Primary Administrator account needs to be changed, click the OK button. Enter the accounts that you wish to use and click OK.
  20. Repeat this process for any other sites.

You should be able to access your site using a URL like http://localmachine:1234/sites/basesite/default.aspx.  This of course depends on how your original URL was constructed.

You may have to change permissions (People and Groups) if you have moved to a new domain or a standalone server.

Good luck! 

Please note that this content is copyrighted. Feel free to link to it, but you may not copy it or post it elsewhere without our permission.