# Snapshot from GCS to AWS Cluster (repository\_missing\_exception)

**URL:** <https://discuss.elastic.co/t/snapshot-from-gcs-to-aws-cluster-repository-missing-exception/165373>\
**Category:** Elasticsearch\
**Created:** [January 23, 2019, 10:14am UTC](https://discuss.elastic.co/t/snapshot-from-gcs-to-aws-cluster-repository-missing-exception/165373 "2019-01-23T10:14:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhishek\_Wahi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhishek_wahi/32/66559_2.png) [@Abhishek\_Wahi](https://discuss.elastic.co/u/Abhishek_Wahi)\
**Post date:** [January 23, 2019, 10:14am UTC](https://discuss.elastic.co/t/snapshot-from-gcs-to-aws-cluster-repository-missing-exception/165373/1 "2019-01-23T10:14:54Z")

</div>

Hi All,

We are migrating our ES cluster from GCP to AWS. Now the repository we were using for snapshot and restore is of type gcs. My new ES cluster on AWS is running. And I want to restore the data that was snapshot by GCS cluster last night to AWS cluster index.  
If I run the restore API with same name as GCS repository name. It is giving error as repository\_missing\_exception.

Also on restarting the ES cluster on AWS servers. Some error related to bucket exists is coming. Please find the error below :

[2019-01-23T13:17:48,480][WARN][o.e.r.RepositoriesService] [node1] failed to create repository [gcs][gcs\_repository]  
org.elasticsearch.common.blobstore.BlobStoreException: Unable to check if bucket [wallbl-es5-backup-m] exists  
at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.doesBucketExist(GoogleCloudStorageBlobStore.java:118) ~[?:?]  
at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.(GoogleCloudStorageBlobStore.java:75) ~[?:?]  
at org.elasticsearch.repositories.gcs.GoogleCloudStorageRepository.(GoogleCloudStorageRepository.java:119) ~[?:?]  
at org.elasticsearch.repositories.gcs.GoogleCloudStoragePlugin.lambda$getRepositories$1(GoogleCloudStoragePlugin.java:129) ~[?:?]  
at org.elasticsearch.repositories.RepositoriesService.createRepository(RepositoriesService.java:384) ~[elasticsearch-6.0.0.jar:6.0.0]  
at org.elasticsearch.repositories.RepositoriesService.applyClusterState(RepositoriesService.java:304) ~[elasticsearch-6.0.0.jar:6.0.0]  
at org.elasticsearch.cluster.service.ClusterApplierService.lambda$callClusterStateAppliers$6(ClusterApplierService.java:495) ~[elasticsearch-6.0.0.jar:6.0.0]  
at java.lang.Iterable.forEach(Iterable.java:75) [?:1.8.0\_111]  
at org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:492) [elasticsearch-6.0.0.jar:6.0.0]  
at org.elasticsearch.cluster.service.ClusterApplierService.applyChanges(ClusterApplierService.java:479) [elasticsearch-6.0.0.jar:6.0.0]  
at org.elasticsearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:429) [elasticsearch-6.0.0.jar:6.0.0]  
at org.elasticsearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:158) [elasticsearch-6.0.0.jar:6.0.0]  
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:569) [elasticsearch-6.0.0.jar:6.0.0]  
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:247) [elasticsearch-6.0.0.jar:6.0.0]  
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:210) [elasticsearch-6.0.0.jar:6.0.0]  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0\_111]  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0\_111]  
at java.lang.Thread.run(Thread.java:745) [?:1.8.0\_111]  
Caused by: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request  
{  
"error" : "invalid\_scope",  
"error\_description" : "Empty or missing scope not allowed."  
}

**Please help in solving this error and restoring the data that was snapshot by GCS cluster last night to AWS cluster index.**

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 23, 2019, 12:17pm UTC](https://discuss.elastic.co/t/snapshot-from-gcs-to-aws-cluster-repository-missing-exception/165373/2 "2019-01-23T12:17:18Z")

</div>

I'm wondering why you are using a so old version? And not latest 6.5.x?

How did you create the repo on the new cluster? What exact commands did you run?

---

<div class="post-metadata">

**Author:** ![Abhishek\_Wahi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhishek_wahi/32/66559_2.png) [@Abhishek\_Wahi](https://discuss.elastic.co/u/Abhishek_Wahi)\
**Post date:** [January 24, 2019, 5:43am UTC](https://discuss.elastic.co/t/snapshot-from-gcs-to-aws-cluster-repository-missing-exception/165373/3 "2019-01-24T05:43:22Z")

</div>

> I'm wondering why you are using a so old version? And not latest 6.5.x?

Well it was a tech lead call not to upgrade till it is not really neccassary.

> How did you create the repo on the new cluster? What exact commands did you run?

Well the cluster was cloned from GCS cluster to AWS cluster by other agency. Now we need to setup the cluster with all the data that was snapshot in GCS cluster and not updated in new cluster due to time taken by the cloning process. So i have not created any repo on new cluster.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 24, 2019, 8:53am UTC](https://discuss.elastic.co/t/snapshot-from-gcs-to-aws-cluster-repository-missing-exception/165373/4 "2019-01-24T08:53:55Z")

</div>

> [@Abhishek\_Wahi](#):
>
> Well it was a tech lead call not to upgrade till it is not really neccassary.

🙄

> [@Abhishek\_Wahi](#):
>
> Well the cluster was cloned from GCS cluster to AWS cluster by other agency. Now we need to setup the cluster with all the data that was snapshot in GCS cluster and not updated in new cluster due to time taken by the cloning process. So i have not created any repo on new cluster.

I'd not do that but recreate the repository on the new cluster.  
Drop the repository and create it again IMHO

---

<div class="post-metadata">

**Author:** ![Abhishek\_Wahi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhishek_wahi/32/66559_2.png) [@Abhishek\_Wahi](https://discuss.elastic.co/u/Abhishek_Wahi)\
**Post date:** [January 24, 2019, 10:11am UTC](https://discuss.elastic.co/t/snapshot-from-gcs-to-aws-cluster-repository-missing-exception/165373/5 "2019-01-24T10:11:44Z")

</div>

> I'd not do that but recreate the repository on the new cluster.  
> Drop the repository and create it again IMHO

And how to restore data from the snapshot taken by GCS cluster on new cluster.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 24, 2019, 10:23am UTC](https://discuss.elastic.co/t/snapshot-from-gcs-to-aws-cluster-repository-missing-exception/165373/6 "2019-01-24T10:23:43Z")

</div>

With the restore API once you have defined the repository again.

---

<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:** [February 21, 2019, 10:23am UTC](https://discuss.elastic.co/t/snapshot-from-gcs-to-aws-cluster-repository-missing-exception/165373/7 "2019-02-21T10:23:45Z")

</div>

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