1

I have a requirement to restore the search service application from the production environment to test server.

I am a bit confused with the below two command lets.

Restore-SPFarm -Directory -Item 'Farm\Shared Services' -Restoremethod-Overwrite

And

Restore-SPEnterpriseSearchServiceApplication -Name "SearchServiceApplication" -ApplicationPool $applicationPool -AdminSearchServiceInstance $searchInstance -DatabaseName "SearchServiceApplication_Admindb" -DatabaseServer "SQLServer1"

Could any one please elaborate the specific scenarios of the usage of the above two commands and which one is suitable for my requirement to restore the search application to different farm.

2

which one is suitable for my requirement to restore the search application to different farm

You should use the first cmdlet to restore a Search service application using PowerShell

Restore-SPFarm -Directory <BackupFolder> -Item "Farm\Shared Service Applications" -RestoreMethod Overwrite [-BackupId <GUID>] [-Verbose]

Note: When you restore a Search service application, it is automatically paused. To resume the Search service application when the restore has completed, type the following command:

$ssa = Get-SPEnterpriseSearchServiceApplication <SearchServiceApplicationName>
$ssa.ForceResume(0x02)

Check the detail steps at Restore Search service applications in SharePoint 2013


But if there are any third party tool that backs up the application data and has to restore the application later, in this case, you should use Restore-SPEnterpriseSearchServiceApplication to create a new search application that uses the restored data.so this is NOT suitable for your scenario

For more details check Restore-SPEnterpriseSearchServiceApplication

  • I tried restoration of search application using command 'Restore-SPFarm -Directory <BackupFolder> -Item "Farm\Shared Service Applications" -RestoreMethod Overwrite [-BackupId <GUID>] [-Verbose]' . I am getting the below error. "Restore-SPFarm : Item Farm\Shared Service Applications not found" Please suggest if any thing missed or any troubleshooting. – kumar Jan 2 '18 at 10:57
0

The two commands can be both used to restore search service application.

If we use “Restore-SPFarm -Item”, we can restore the part of the backup package including the search service application. For more detailed information, refer to the article below.

Restore-SPFarm.

https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/restore-spfarm?view=sharepoint-ps

The Restore-SPEnterpriseSearchServiceApplication command is used to restore search service application specially. For more detailed information, refer to the article below.

Restore-SPEnterpriseSearchServiceApplication.

https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/restore-spenterprisesearchserviceapplication?view=sharepoint-ps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.