Friday, June 8, 2012

How to restore content database using PowerShell in SharePoint 2010 ?



  1. Open SharePoint 2010 Management Shell.
  2. At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:

Restore-SPFarm -Directory <Backup folder name> -RestoreMethod Overwrite -Item <Content database name> [-BackupId <GUID>] [-Verbose]

3.      If you do not use the BackupId parameter, the most recent backup will be used. To view a list of the backups, including their Backup IDs, type the following command, and then press ENTER:

Get-SPBackupHistory -Directory <Backup folder>

How to restore content database using SQL server in SharePoint 2010 ?


  1. If the Windows SharePoint Services Timer service is running, stop the service and wait for several minutes for any currently running stored procedures to finish.
  2. Do not restart the service until after you restore the content databases.
  3. Open SQL Server Management Studio
  4. Connect to the database server.
  5. Right-click the Database that you want to restore > Tasks > Restore > Database.
  6. In the Restore Database dialog box, specify the destination and the source, and then select the backup set or sets that you want to restore.
  7. In the Select a page pane, click Options.
  8. In the Restore options section, select only Overwrite the existing database.
  9. In the Recovery state section:
    • If you have included all the transaction logs that you must restore, select RECOVER WITH RECOVERY.
    • If you must restore additional transaction logs, select RECOVER WITH NORECOVERY.
    • The third option, RECOVER WITH STANDBY is not used in this scenario.
  10. Click OK to complete the recovery operation.
  11. Repeat steps 4 through 10 for each database that you are restoring.
  12. Start the Windows SharePoint Services Timer service.

How to restore content database using Central Admin in SharePoint 2010 ?


  1. Open Central Administration
  2. On the Home page, in the Backup and Restore > Restore from a backup.
  3. The process contains 3 steps

Step 1
Select Backup > Select the backup job that contains the content database backup > Next.
Step 2
Select Component > select the check box that is next to the content database > Next.
Step 3
Select Restore Options > under Type of Restore > click the Same configuration option. A dialog box appears that asks you to confirm the operation. Click OK > Click Start Restore

  1. You can view the general status of all recovery jobs at the top of the Backup and Restore Job Status page in the Readiness section.
  2. You can view the status for the current recovery job in the lower part of the page in the Restore section.
  3. The status page updates every 30 seconds automatically.
  4. You can manually update the status details by clicking Refresh.
  5. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the recovery to start.