转自:http://blog.fpweb.net/move-sharepoint-2013-search-components-to-new-server/#.V_w4JZH_6uh

In this post, I’ll detail how to move all SharePoint 2013 search components to a different server in the SharePoint farm. Unlike SharePoint 2010, there are no topology options in Central Administration so the entire operation must be performed in PowerShell.

Although that may stress some admins out, I’ve found that moving the topology via PowerShell in SharePoint 2013 works much better than moving it via the UI in SharePoint 2010. As you should assume, there is no PowerShell command like:

MOVE-SPSEARCHTOPOLOGY –COMPONENTS ALL –DESTINATION NEWSERVER.

That’d be nice. And too easy. And honestly, it probably wouldn’t work anyway.

I’m going to assume you have a working Search Service in your (at least) two server SharePoint farm. I’m also going to assume you have rudimentary knowledge of using PowerShell with SharePoint.

Before performing any operation, your Search Administration topology section should look like this:

CLEAR THE SHAREPOINT CACHE ON ALL SHAREPOINT SERVERS

Although this isn’t necessary, performing this simple operation will avoid future potential headaches. Trust me.

CLONE THE EXISTING TOPOLOGY

The first real step is to clone the existing topology to move all the search components except for the Admin component. The Admin component must remain online to move all other components, so this particular component has to be moved separately.

You could choose to move the admin component first and then all others after it is moved. I prefer moving it last, because if there’s going to be an issue, I’d prefer it not to be with the admin component. Recovering from a failed move of the admin component can be a complete nightmare.

If it’s going to fail, fail on one of the other components. It’s much easier to troubleshoot.

Anyway, execute the following lines to clone the existing service:

$SSA = GET-SPENTERPRISESEARCHSERVICEAPPLICATION
$ACTIVE = GET-SPENTERPRISESEARCHTOPOLOGY -SEARCHAPPLICATION $SSA –ACTIVE
$CLONE = NEW-SPENTERPRISESEARCHTOPOLOGY -SEARCHAPPLICATION $SSA -CLONE –SEARCHTOPOLOGY $ACTIVE

START THE SEARCH SERVICE ON THE NEW SERVER

Before you can move the components, a search service must exist on the new server. Run the following (obviously, you need to replace the NewServerName):

$NEWSERVER = GET-SPENTERPRISESEARCHSERVICEINSTANCE -IDENTITY “NEWSERVERNAME“

Now that you have identified the new server, start the service on the server by:

START-SPENTERPRISESEARCHSERVICEINSTANCE -IDENTITY $NEWSERVER

The next step is where a lot of people get stuck. Now that the service has been started, they assume they are good to start creating the new components on the server (which is the next step). But before doing so, you must ensure the new search service is online on the new server.

Type this:

GET-SPENTERPRISESEARCHSERVICEINSTANCE -IDENTITY $NEWSERVER

You should see something similar to the following in the console:

If the Status says anything other than online, wait a few minutes and retry the command. Repeat until you see something like this:

Now the Status is online, we can continue.

CREATE NEW SEARCH COMPONENTS ON THE NEW SEARCH SERVER

Now you want to create all Search components except for the admin component. Use the following:

NEW-SPENTERPRISESEARCHQUERYPROCESSINGCOMPONENT -SEARCHTOPOLOGY $CLONE -SEARCHSERVICEINSTANCE $NEWSERVER
NEW-SPENTERPRISESEARCHANALYTICSPROCESSINGCOMPONENT -SEARCHTOPOLOGY $CLONE -SEARCHSERVICEINSTANCE $NEWSERVER
NEW-SPENTERPRISESEARCHCONTENTPROCESSINGCOMPONENT -SEARCHTOPOLOGY $CLONE -SEARCHSERVICEINSTANCE $NEWSERVER
NEW-SPENTERPRISESEARCHCRAWLCOMPONENT -SEARCHTOPOLOGY $CLONE -SEARCHSERVICEINSTANCE $NEWSERVER
NEW-SPENTERPRISESEARCHINDEXCOMPONENT -SEARCHTOPOLOGY $CLONE -INDEXPARTITION 0 -SEARCHSERVICEINSTANCE $NEWSERVER

There are options on the Index Component that you may be interested in researching. But those are really beyond the scope of the article. Look here for more information:https://technet.microsoft.com/en-us/library/jj219721.aspx.

For now though, let’s assume you’re happy with the parameters. To actually create the components, use this:

SET-SPENTERPRISESEARCHTOPOLOGY -IDENTITY $CLONE

And wait…

When it’s finally completed, your topology page should now look like this:

REMOVE COMPONENTS FROM ORGINAL SEARCH SERVER

Now let’s remove components from the original server. First, close the topology again. Do this:

$SSA = GET-SPENTERPRISESEARCHSERVICEAPPLICATION
$ACTIVE = GET-SPENTERPRISESEARCHTOPOLOGY -SEARCHAPPLICATION $SSA -ACTIVE
$CLONE = NEW-SPENTERPRISESEARCHTOPOLOGY -SEARCHAPPLICATION $SSA -CLONE –SEARCHTOPOLOGY $ACTIVE

Now you need to get the identity of the search components. Type this:

GET-SPENTERPRISESEARCHCOMPONENT -SEARCHTOPOLOGY $CLONE

The console spits out all the search components in the farm. You’ll need to look through the output to find the values applicable to your SharePoint farm. Here’s a portion of what the console should look like:

You need the NAME of all components for the old Search Server. In my SharePoint farm, SP2013Demo101 is the old search server and SP2013Demo112 is the new search server. So, the CrawlCompont0 and QueryProcessingComponent1 are some of the names I need.

So now you’ll use the following to remove these components.

Obviously, you’ll want to change the identity for the Names of the components in your environment. Use the output from Get-SPEnterpriseSearchComponent to ensure you have a Remove-SPEnterpriseSearchComponent for all components on the old server, except for the admin component.

Be careful, the names are case sensitive!

Also, notice there is no admin component in the below list.

REMOVE-SPENTERPRISESEARCHCOMPONENT -IDENTITY QUERYPROCESSINGCOMPONENT1 -SEARCHTOPOLOGY $CLONE -CONFIRM:$FALSE
REMOVE-SPENTERPRISESEARCHCOMPONENT -IDENTITY CRAWLCOMPONENT0 -SEARCHTOPOLOGY $CLONE -CONFIRM:$FALSE
REMOVE-SPENTERPRISESEARCHCOMPONENT -IDENTITY INDEXCOMPONENT1 -SEARCHTOPOLOGY $CLONE -CONFIRM:$FALSE
REMOVE-SPENTERPRISESEARCHCOMPONENT -IDENTITY ANALYTICSPROCESSINGCOMPONENT1 -SEARCHTOPOLOGY $CLONE -CONFIRM:$FALSE
REMOVE-SPENTERPRISESEARCHCOMPONENT -IDENTITY CONTENTPROCESSINGCOMPONENT1 -SEARCHTOPOLOGY $CLONE -CONFIRM:$FALSE

SET-SPENTERPRISESEARCHTOPOLOGY -IDENTITY $CLONE

You’ll have to wait for a while to let SharePoint do its thing.

When it’s done, your topology will look like this:

Great! The only thing left is move the admin component. It’s pretty much identical to the other components, so I won’t go into great detail.

START AN ADMIN COMPONENT ON THE NEW SERVER

First, clone the topology:

$SSA = GET-SPENTERPRISESEARCHSERVICEAPPLICATION
$ACTIVE = GET-SPENTERPRISESEARCHTOPOLOGY -SEARCHAPPLICATION $SSA –ACTIVE
$CLONE = NEW-SPENTERPRISESEARCHTOPOLOGY -SEARCHAPPLICATION $SSA -CLONE –SEARCHTOPOLOGY $ACTIVE

Second, identify the destination server:

$NEWSERVER = GET-SPENTERPRISESEARCHSERVICEINSTANCE -IDENTITY “NEWSERVERNAME“

Start a new admin component on the new server.

NEW-SPENTERPRISESEARCHADMINCOMPONENT -SEARCHTOPOLOGY $CLONE -SEARCHSERVICEINSTANCE $NEWSERVER
SET-SPENTERPRISESEARCHTOPOLOGY -IDENTITY $CLONE

Again, you wait.

When it’s done the topology will look like this:

DELETE THE OLD ADMIN COMPONENT

Now you have to delete the old admin component. First, clone the topology:

$SSA = GET-SPENTERPRISESEARCHSERVICEAPPLICATION
$ACTIVE = GET-SPENTERPRISESEARCHTOPOLOGY -SEARCHAPPLICATION $SSA -ACTIVE
$CLONE = NEW-SPENTERPRISESEARCHTOPOLOGY -SEARCHAPPLICATION $SSA -CLONE –SEARCHTOPOLOGY $ACTIVE

Remove the admin component. If you have to, run Get-SPEnterpriseSearchComponent to get the proper name of the admin component running on the old server.

REMOVE-SPENTERPRISESEARCHCOMPONENT -IDENTITY ADMINCOMPONENT1 -SEARCHTOPOLOGY $CLONE -CONFIRM:$FALSE
SET-SPENTERPRISESEARCHTOPOLOGY -IDENTITY $CLONE

When this is done, your Topology will look like:

Congratulations! All search components are now online on the new server.

最新文章

  1. Web安全开发之验证码设计不当引发的撞库问题
  2. webpack配置别名alias出现的错误匹配
  3. sql FOR XML PATH
  4. 客户端显示Not yet reported
  5. Interview----First single charactor
  6. ubuntu命令查询版本和内核版本
  7. @EnableFeignClients 注解
  8. 072、一文搞懂各种Docker网络 (2019-04-17 周三)
  9. centos7与centos6命令区别
  10. vue项目做seo优化(prerender-spa-plugin vue-meta-info)
  11. leetcode136只出现一次的数字
  12. 基于Docker+Jenkins+Gitlab搭建持续集成环境
  13. 标准遗传算法(实数编码 python实现)模拟二进制交叉SBX 多项式变异
  14. 利用反射创建User类的对象
  15. 鼠标滑过table时修改表格行的背景颜色
  16. html5-css渐变应用小实例,按钮
  17. Sequentially-consistent ordering
  18. 学习MVC之租房网站(十一)-定时任务和云存储
  19. Groovy 学习手册(2)
  20. ORACLE中Drop table cascade constraints之后果.

热门文章

  1. WebApi 插件式构建方案:IOC 容器初始化
  2. C#基础之流程控制语句详解
  3. iOS 错误 undefined symbols for architecture i386
  4. windows挂载网络盘
  5. poj 3133 Manhattan Wiring
  6. window.open完美替代window.showModalDialog
  7. 2016级算法第六次上机-B.ModricWang's FFT : EASY VERSION
  8. django在model中添加字段报错
  9. 使用Chrome-headless模式下,截屏不全屏的问题
  10. python连接,操作 InfluxDB