# Put onprem snapshot to S3 and restoring it to cloud cluster

**URL:** https://discuss.elastic.co/t/put-onprem-snapshot-to-s3-and-restoring-it-to-cloud-cluster/264249
**Category:** Elasticsearch
**Tags:** snapshot-and-restore
**Created:** [February 14, 2021, 11:30am UTC](https://discuss.elastic.co/t/put-onprem-snapshot-to-s3-and-restoring-it-to-cloud-cluster/264249 "2021-02-14T11:30:05Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Vishal\_Yadav1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vishal_yadav1/32/82185_2.png) [@Vishal\_Yadav1](https://discuss.elastic.co/u/Vishal_Yadav1)
#### Post date: [February 14, 2021, 11:30am UTC](https://discuss.elastic.co/t/put-onprem-snapshot-to-s3-and-restoring-it-to-cloud-cluster/264249/1 "2021-02-14T11:30:06Z")

</div>

Hi Team,  
Can we restore on prem snapshot to aws cloud through S3?  
We created snapshot and dump indices to S3 and then we want to restore it to the cloud cluster.  
We are using cloud-aws plugin both the sides

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 15, 2021, 1:55am UTC](https://discuss.elastic.co/t/put-onprem-snapshot-to-s3-and-restoring-it-to-cloud-cluster/264249/2 "2021-02-15T01:55:00Z")

</div>

Welcome to our community! 😃

Yes you can do this as long as you add the repo to the Cloud cluster.

---

<div class="post-metadata">

### Author: ![Vishal\_Yadav1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vishal_yadav1/32/82185_2.png) [@Vishal\_Yadav1](https://discuss.elastic.co/u/Vishal_Yadav1)
#### Post date: [February 15, 2021, 4:45am UTC](https://discuss.elastic.co/t/put-onprem-snapshot-to-s3-and-restoring-it-to-cloud-cluster/264249/3 "2021-02-15T04:45:55Z")

</div>

Thanks a lot warkolm.

Now we have created the snapshot repo with same settings.  
and pushed onprem data to s3.  
Now over cloud i have created a new index with different name and want to restore it from s3.  
Could you please help here.  
Below is my onprem repo settings.

```auto
	curl -XPUT "http://localhost:9200/_snapshot/myrepo?pretty" -H 'Content-Type: application/json' -d 
	'{
	  "type": "s3",
	   "settings": {
	     "bucket": "migrationbucket",
	     "base_path": "myindex",
	     "region": "us-east-1",
	     "access_key": "XXXXXXXXXXXXX",
	     "secret_key": "XXXXXXXXXXXXXXXXXX"
	   }
	 }'

```

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 15, 2021, 5:34am UTC](https://discuss.elastic.co/t/put-onprem-snapshot-to-s3-and-restoring-it-to-cloud-cluster/264249/4 "2021-02-15T05:34:35Z")

</div>

What are you looking for help with sorry, which part?

---

<div class="post-metadata">

### Author: ![Vishal\_Yadav1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vishal_yadav1/32/82185_2.png) [@Vishal\_Yadav1](https://discuss.elastic.co/u/Vishal_Yadav1)
#### Post date: [February 15, 2021, 5:37am UTC](https://discuss.elastic.co/t/put-onprem-snapshot-to-s3-and-restoring-it-to-cloud-cluster/264249/5 "2021-02-15T05:37:34Z")

</div>

What steps are needed after onprem data put to S3.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 15, 2021, 5:38am UTC](https://discuss.elastic.co/t/put-onprem-snapshot-to-s3-and-restoring-it-to-cloud-cluster/264249/6 "2021-02-15T05:38:01Z")

</div>

Add the repo to the Cloud cluster and then run a restore.

---

<div class="post-metadata">

### Author: ![Vishal\_Yadav1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vishal_yadav1/32/82185_2.png) [@Vishal\_Yadav1](https://discuss.elastic.co/u/Vishal_Yadav1)
#### Post date: [February 15, 2021, 5:41am UTC](https://discuss.elastic.co/t/put-onprem-snapshot-to-s3-and-restoring-it-to-cloud-cluster/264249/7 "2021-02-15T05:41:19Z")

</div>

when i call restore it says  
`cannot restore index [INDEX_name] because it's open"`  
I want to put data to another named index becasue we already have same index name on cloud.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 15, 2021, 5:42am UTC](https://discuss.elastic.co/t/put-onprem-snapshot-to-s3-and-restoring-it-to-cloud-cluster/264249/8 "2021-02-15T05:42:05Z")

</div>

You can rename restores, see [Restore a snapshot | Elasticsearch Reference [7.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.11/snapshots-restore-snapshot.html)

---

<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: [March 15, 2021, 5:42am UTC](https://discuss.elastic.co/t/put-onprem-snapshot-to-s3-and-restoring-it-to-cloud-cluster/264249/9 "2021-03-15T05:42:56Z")

</div>

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