# Elasticsearch backup GCP plugin

**URL:** <https://discuss.elastic.co/t/elasticsearch-backup-gcp-plugin/173132>\
**Category:** Elasticsearch\
**Created:** [March 20, 2019, 11:50am UTC](https://discuss.elastic.co/t/elasticsearch-backup-gcp-plugin/173132 "2019-03-20T11:50:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Callonski](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@Callonski](https://discuss.elastic.co/u/Callonski)\
**Post date:** [March 20, 2019, 11:50am UTC](https://discuss.elastic.co/t/elasticsearch-backup-gcp-plugin/173132/1 "2019-03-20T11:50:21Z")

</div>

I'm having trouble securing a backup for elasticsearch running on GCP, kubernetes.  
I've tried two approaches.

The first, that seems like the best is taking snapshots and store in a bucket.

I’ve installed this plugin on every pod:

https://www.elastic.co/guide/en/elasticsearch/plugins/current/discovery-gce.html

Following these instructions:

https://github.com/elastic/elasticsearch/blob/eb8f3462042693b950d8200a4d740f07641b7be4/docs/plugins/repository-gcs.asciidoc#client-settings

I’ve re-started the pods, saved the credentials in elasticsearch keystore, the cluster has full storage permissions.

When I try to configure a repository through the snapshot-API in Elasticsearch I get errors.  
"[backup] repository type [gcs] does not exist"

The second approach for backup I’ve tried is :

> **[GoogleCloudPlatform/click-to-deploy](https://github.com/GoogleCloudPlatform/click-to-deploy/tree/master/k8s/elasticsearch)**
>
> Source for Google Click to Deploy solutions listed on Google Cloud Marketplace. - GoogleCloudPlatform/click-to-deploy

It works great, but I’m not able to dynamically provision the backup-disk. So I would have to know in advance the disk-space I would need. Any clue of how to be able to set this dynamically?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 20, 2019, 12:23pm UTC](https://discuss.elastic.co/t/elasticsearch-backup-gcp-plugin/173132/2 "2019-03-20T12:23:45Z")

</div>

> [@Callonski](#):
>
> `[backup] repository type [gcs] does not exist`

I think this indicates that the plugin is not installed, or at least is not installed everywhere. Can you share the output of `GET /_nodes/plugins?filter_path=nodes.*.plugins,nodes.*.name`.

---

<div class="post-metadata">

**Author:** ![Callonski](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@Callonski](https://discuss.elastic.co/u/Callonski)\
**Post date:** [March 20, 2019, 12:45pm UTC](https://discuss.elastic.co/t/elasticsearch-backup-gcp-plugin/173132/3 "2019-03-20T12:45:26Z")

</div>

Thanks for the quick reply!  
You're right,  
The output is :  
{  
"nodes": {  
"rqwebKVmQKSDmunhEdSHoA": {  
"plugins":   
},  
"XiKeE5UZTnGp90Ob5nKAew": {  
"plugins":   
}  
}  
}

But if I go to: /usr/share/elasticsearch/plugins# , I see discovery-gce.  
I'm using :  
kubectl exec -it [nameOfpod] -- /bin/bash  
to access my pod. Is that the wrong approach? I tried SSH into the node, but it wont let me.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 20, 2019, 12:57pm UTC](https://discuss.elastic.co/t/elasticsearch-backup-gcp-plugin/173132/4 "2019-03-20T12:57:25Z")

</div>

Are there any messages indicating problems loading plugins in the Elasticsearch server logs?

Is `/usr/share/elasticsearch/plugins` the right place for plugins? Where is your `elasticsearch.yml` file?

---

<div class="post-metadata">

**Author:** ![Callonski](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@Callonski](https://discuss.elastic.co/u/Callonski)\
**Post date:** [March 22, 2019, 11:45am UTC](https://discuss.elastic.co/t/elasticsearch-backup-gcp-plugin/173132/5 "2019-03-22T11:45:25Z")

</div>

I'm not sure if I'm installing the plugin the right way. The documentation says:  
The plugin must be installed on every node in the cluster.  
When I SSH into the nodes, it wont let me install the plugin.  
I only get: bin/elasticsearch-plugin: No such file or directory  
But when I SSH into the pod, I can install the plugin. I get this:

```
-> Downloading discovery-gce from elastic 
[=================================================] 100%?? 

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@
@ WARNING: plugin requires additional permissions @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.RuntimePermission setFactory
* java.lang.reflect.ReflectPermission suppressAccessChecks
* java.net.SocketPermission * connect,resolve
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permission

```

Any clue on which approach I should take?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 22, 2019, 1:59pm UTC](https://discuss.elastic.co/t/elasticsearch-backup-gcp-plugin/173132/6 "2019-03-22T13:59:06Z")

</div>

> [@Callonski](#):
>
> But when I SSH into the pod, I can install the plugin.

This looks like it's working (presuming there's more text after this too). One possibility is that the installation is not persistent: it's installing the plugin onto the ephemeral storage within the container so that it's not there the next time it starts up.

> [@Callonski](#):
>
> When I SSH into the nodes, it wont let me install the plugin.  
> I only get: bin/elasticsearch-plugin: No such file or directory

Are you running this from wherever Elasticsearch is installed? Is Elasticsearch even installed on the nodes or is it all within the containers?

---

<div class="post-metadata">

**Author:** ![Callonski](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@Callonski](https://discuss.elastic.co/u/Callonski)\
**Post date:** [March 22, 2019, 2:15pm UTC](https://discuss.elastic.co/t/elasticsearch-backup-gcp-plugin/173132/7 "2019-03-22T14:15:10Z")

</div>

I think I have elasticsearch installed on the pods. Not on the nodes, in a K8 cluster. I've been following this guide:

> **[GoogleCloudPlatform/click-to-deploy](https://github.com/GoogleCloudPlatform/click-to-deploy/tree/master/k8s/elasticsearch)**
>
> Source for Google Click to Deploy solutions listed on Google Cloud Marketplace. - GoogleCloudPlatform/click-to-deploy

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 22, 2019, 2:25pm UTC](https://discuss.elastic.co/t/elasticsearch-backup-gcp-plugin/173132/8 "2019-03-22T14:25:22Z")

</div>

Hmm, ok, I'm not familiar with these packages. It does seem pretty strange that something from `GoogleCloudPlatform` doesn't include the `repository-gcs` plugin 🙂 Perhaps you could open an issue against that repo asking for this to be included?

I am a little confused about the plugin that you're installing. Your original post was talking about backups, i.e., `repository-gcs`, but in a later post you seem to be installing a discovery plugin, i.e. `discovery-gce`. I get these confused all the time.

Could you use the [official Elasticsearch Helm chart](https://github.com/elastic/helm-charts/tree/master/elasticsearch) instead? The README doc there includes instructions for installing plugins.

---

<div class="post-metadata">

**Author:** ![Callonski](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@Callonski](https://discuss.elastic.co/u/Callonski)\
**Post date:** [March 22, 2019, 2:34pm UTC](https://discuss.elastic.co/t/elasticsearch-backup-gcp-plugin/173132/9 "2019-03-22T14:34:13Z")

</div>

Thanks.  
I think I had myself confused as well🙂. It's the repository-gcs backup plugin I wanted to install.  
I will try with the Helm chart.

---

<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:** [April 19, 2019, 2:39pm UTC](https://discuss.elastic.co/t/elasticsearch-backup-gcp-plugin/173132/10 "2019-04-19T14:39:26Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
