Domanda

I am trying to restore the production farm Search Service Application to a pre-production farm.

This is to preserve all customisations to Search.

I have mounted a copy of each of the 4 databases (Admin, Links, Crawl, and Reporting) to a new SQL server instance.

When I try to run the following command :

$searchInstance = Get-SPEnterpriseSearchServiceInstance -local

$applicationPool = Get-SPServiceApplicationPool -Identity "PSP_SearchServiceApplicationPool"

Restore-SPEnterpriseSearchServiceApplication -Name "Search Service Application" -ApplicationPool $applicationPool -AdminSearchServiceInstance $searchInstance -DatabaseName "PSP_SearchAdmin" -DatabaseServer "SHAREPOINT_PREPROD"

I get the following error message :

Error 1

If I don't have the database attached, or I try a new DB name, I get the following error message :

Error 2

This seems like a catch-22 situation.

What am I doing wrong?

È stato utile?

Soluzione 3

It turned out that there were remnants of the previous attempts in the SharePoint configuration database.

Get-SPDataBase

I removed these by issuing the following commands:

$delete = Get-SPDatabase "ID"
$delete.delete()

Altri suggerimenti

You have to create a new application pool for this to work.

You can export the topology and use it in the restore as follows.

# E.g. Export the current Search Topology from your Production farm as xml file
$ssa = Get-SPEnterpriseSearchServiceApplication
Export-SPEnterpriseSearchTopology -SearchApplication $ssa -Filename <FilePath\searchtopology.xml>

# Create a new application pool for your restored Search Service Application
$applicationPool = New-SPServiceApplicationPool -Name "SearchServiceApplicationPool" -Account "domain\username"
# or get an already existing application pool that you like to use:
# $applicationPool = Get-SPServiceApplicationPool -Identity <ApplicationPoolName>

# Restore the Search Service Application
Restore-SPEnterpriseSearchServiceApplication -Name <SearchServiceApplicationName>
-ApplicationPool $applicationPool
-TopologyFile <FilePath\searchtopology.xml>

SharePoint 2013 – Restore Search Service Application on different Server or Farm

You should ONLY restore the Admin Database. The other three DBs will be recreated. The other trick is to "Name" the Search Service after your Databases and then rename it afterwards. I review these steps in my Upgrade class on Pluralsight.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top