The article will guide you through the process of restoring Sharepoint data that was backed up using the techniques described in the "How do I back up Sharepoint?" how-to.
Depending on which method from the backup guide you used to back up Sharepoint, your restore procedure will differ. Instructions for each method will be given, but there are some additional considerations:
- Whether or not you need to restore the configuration database. You'll need to do this if information in the configuration database is not synchronized with how your SharePoint farm is actually configured.
- If you need to restore your farm into a different farm or a farm with a different topology, see the procedures in this Microsoft guide.
- If you did not back up the SQL databases using a File and Folder backup set, you cannot restore the configuration database. The reason is that methods other than the direct selection of SQL databases only capture one database at a time instead of a consistent point in time snapshot of all databases. The direct selection of SQL databases, however, does capture a single point-in-time snapshot of all of your databases (even if they are across multiple volumes, as long as all volumes are part of the backup).
If you need to manually recreate the configuration database and Central Administration content database, you can do it using the SharePoint Products and Technologies Configuration Wizard or the psconfig tool. It is recommended you consult Microsoft's documentation to familiarize yourself with restore procedures.
Restoring If Backed Up Directly With File and Folder Backup Set
Use the instructions in this section if you backed up the SharePoint SQL server databases by directly backing up the database files (.MDF, .LDF, and .NDF).
- Stop all SQL Server, IIS, and SharePoint services.
- Open the Intronis backup software and go to the Restore tab.
Choose to restore all database files from the Files and Folders section.
- If you chose to back up the search indexes, be sure to restore those files to their original locations.
- Use the SQL Server management tools to re-attach to the restored database files.
- Restart all services stopped in step (1).
If you chose not to back up the search index, you must clear your search index and recrawl the content.
- To do this, open Central Administration.
- Select the appropriate Shared Services Provider (SSP) from the navigation menu.
- Underneath the search header, choose Search Settings.
- Then, click Reset all crawled content and go to Content sources and crawl schedules that will allow you to initiate a full crawl.
If you only want to restore certain items from your content databases, then you can restore the .MDF, .LDF, and .NDF files for your content databases to an alternate location and attach them as a different database name in SQL server. You can then create a recovery farm and attach the restored content database to the recovery farm where you can restore your specific items from.
Restoring From Backed Up SQL (.bak) Files
Use these instructions if you backed up the SharePoint SQL server databases by using the SQL Server backup tools. With this technique, you can restore content databases, databases for Shared Service Providers (SSPs), search databases, and search databases for SSPs. Also, you can restore the Central Administration content database and Configuration database, but only if you are restoring to a server with exactly the same environment as the one where the data was backed up, including the same SharePoint version, server names, server roles, etc.
- Shut down all SharePoint and IIS services. Wait a few minutes for all SharePoint stored procedures to finish.
- Use the Intronis software to restore the SQL (.bak) files you selected with the file plugin.
- If you want to keep the changes since your last backup and you have complete and intact transaction logs since your last full backup, you can optionally restore your live transaction logs using SQL.
- Once you restore the database(s) from your last full backup, you can then restore your transaction log backups to roll forward as far as possible.
- Start SQL Server Management Studio and connect to the appropriate server.
- Locate and right click the database you want to restore.
- Choose the Tasks, Restore, Database command.
- On this dialog, specify the backup source and restore destination (defaults are usually fine), and select the full backup you downloaded in step (2).
On the Select a page area, choose Options and within the Restore options section, check the Overwrite the existing database option (typically you want to leave other settings in this section unchecked).
Click OK and the restore will begin for this database.
- Repeat steps (1) through (9) for every database that you want to restore.
- Restart the SharePoint and IIS services.
Lastly, you must clear your search index and recrawl the content. To do this:
- Open Central Administration, select the appropriate Shared Services Provider (SSP) from the navigation menu.
- Underneath the search header, choose Search Settings.
- Click Reset all crawled content and go to Content sources and crawl schedules, which will allow you to initiate a full crawl.
For more information on how to restore databases using the SQL server management tools, refer to the topic on backing up and restoring databases in the SQL Server documentation.
Restoring From Backups Which Used the STSADM Tool Method
Use the instructions in this section if you had backed up SharePoint using the stsadm tool. We also highly recommend reading over Microsoft's documentation on restoring a farm as well as restoring using the stsadmin tool. Note that restoring from one version of SharePoint to a different version is not supported. If you do not restore the entire SSP node, then search may take several minutes (or even longer for large sites) because the search index will have to be rebuilt (partially or fully).
- Open the backup software, go to the Restore tab and go to Files and Folders. Restore all backup files to a restore directory (in our examples, we'll be using E:\SharePointBackups).
Open a command prompt and execute the following commands. This will list the GUIDs of all items available in the specified directory.
cd %COMMONPROGRAMFILES%\Microsoft Shared\Web Server Extensions\12\Bin
stsadm -o backuphistory -directory E:\SharePointBackups
- Choose an item to restore from the list generated by the previous step and find the corresponding GUID of that item (also in the output of the previous command). Then, in the command prompt, execute:
stsadm -o restore -directory E:\SharePointBackups -backupid GUID -restoremethod overwrite
This will overwrite any existing data in SharePoint for the item you are restoring. Other restore methods are available, see documentation on the stsadm restore operation.
- Follow the steps and prompts as the command in step (3) executes (confirm when it asks you if you are sure you want to overwrite files, and you may be asked to enter credentials to connect to the web application or content database).
- When the command finishes it will tell you how many warnings and errors were encountered. Refer to the sprestore.log file for detailed information if there are any errors or warnings.