# Knapsack plugin import export index problem(Only node client and import export)

**URL:** https://discuss.elastic.co/t/knapsack-plugin-import-export-index-problem-only-node-client-and-import-export/58268
**Category:** Elasticsearch
**Created:** [August 17, 2016, 2:57pm UTC](https://discuss.elastic.co/t/knapsack-plugin-import-export-index-problem-only-node-client-and-import-export/58268 "2016-08-17T14:57:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tfasun](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@tfasun](https://discuss.elastic.co/u/tfasun)
#### Post date: [August 17, 2016, 2:57pm UTC](https://discuss.elastic.co/t/knapsack-plugin-import-export-index-problem-only-node-client-and-import-export/58268/1 "2016-08-17T14:57:00Z")

</div>

First I write for my localhost

I create a node client:

Node node = nodeBuilder().settings(nodeSettings).client(true).node();  
return node.client();

I did not add Knapsack plugin to my client because I install the plugin my ES server.

I use the client and export my index for localhost es server.

KnapsackExportRequestBuilder requestBuilder = new KnapsackExportRequestBuilder(client)  
.setIndex("ulbgj186s253p7t4knm79iloks3kjcod")  
.setArchivePath(exportPath)  
.setOverwriteAllowed(true);  
KnapsackExportResponse knapsackExportResponse = requestBuilder.execute().actionGet();

Everything is good,no problem I export and import my indexes.

BUT...When I write same code for remote ES server.There are problems  
First.I install Knapsack plugin my remote ES server.  
But When I use the node client (nodeBuilder().settings(nodeSettings).client(true).node()😉

I get error(KnapsackAction not found).

Then I write other client

Set\<Class\<? extends Plugin\>\> plugins = new HashSet\<\>();  
plugins.add(KnapsackPlugin.class);  
Environment environment = new Environment(nodeSettings);  
Node node = new MockNode(environment, plugins);  
// AbstractClient client = (AbstractClient)node.client();7  
return node.start().client();

But the client start e node and get nosuchndex error.

I want to create only client node and export and import for remote ES server.

Everything is perfect in mylocalhost.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 5, 2017, 10:27pm UTC](https://discuss.elastic.co/t/knapsack-plugin-import-export-index-problem-only-node-client-and-import-export/58268/2 "2017-07-05T22:27:13Z")

</div>


