Home » Microsoft » 70-667 » Which command should you run to restore the content database
You configure a SharePoint Server 2010 Service Pack 1 (SP1) server farm. You need to perform backup and restore of a site collection and its content database by using Windows PowerShell.
Which command should you run to restore the content database
A. Restore-SPFarm -Directory \FileServer_Namesharesite_name.bak -RestoreMethod Overwrite Item "FarmMicrosoft SharePoint Foundation Web ApplicationAdventureWorks"
B. Backup-SPFarm -Directory \FileServer_NameSharePointBackupFolder -BackupMethod Full
C. Backup-SPFarm -Directory \FileServer_NameSharePointBackupFolder -BackupMethod Full Item WSS_AdventureWorks
D. Restore-SPFarm -Directory \FileServer_Namesharesite_name.bak -RestoreMethod Overwrite Item WSS_AdventureWorks
E. Restore-SPSite http://localhost -Path \FileServer_NameSharePointBackupFolder SiteBackup. bak -Force
F. Restore-SPFarm -Directory \FileServer_Namesharesite_name.bak -RestoreMethod Overwrite -ConfigurationOnly
G. Backup-SPFarm -Directory \FileServer_NameSharePointBackupFolder -Item "FarmMicrosoft SharePoint Foundation Web ApplicationAdventureWorks" -BackupMethod Full
H. Backup-SPSite http://localhost -Path \FileServer_NameSharePointBackupFolderSiteBackup. bak
Correct Answer: D
Explanation/Reference:
Use Windows PowerShell to restore a SharePoint content database
You can use Windows PowerShell to restore a content database.
To restore a content database by using Windows PowerShell
Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
On the Start menu, click All Programs.
Click Microsoft SharePoint 2010 Products.
Click SharePoint 2010 Management Shell.
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]
Note:
If you are not logged on as the Farm account, you are prompted for the Farm account’s credentials.
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>
http://technet.microsoft.com/en-us/library/ff607783.aspx : -RestoreMethod -Overwrite; Restores content and settings to their original locations and is intended to be used when restoring to the same farm it was backed up from. If the Overwrite parameter is used, a confirmation prompt is displayed. If you want the confirmation prompt suppressed, use the Force parameter.