# Accessing the snapshot after deleting the repository

**URL:** <https://discuss.elastic.co/t/accessing-the-snapshot-after-deleting-the-repository/215682>\
**Category:** Elasticsearch\
**Created:** [January 20, 2020, 7:51am UTC](https://discuss.elastic.co/t/accessing-the-snapshot-after-deleting-the-repository/215682 "2020-01-20T07:51:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephy\_Jacob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephy_jacob/32/45032_2.png) [@Stephy\_Jacob](https://discuss.elastic.co/u/Stephy_Jacob)\
**Post date:** [January 20, 2020, 7:51am UTC](https://discuss.elastic.co/t/accessing-the-snapshot-after-deleting-the-repository/215682/1 "2020-01-20T07:51:19Z")

</div>

Hi Team,  
We have accidentally deleted a repository that was having a valid snapshot. We understand from the snapshot documentation that, deleting a repository only unregister, that means only removes the reference to the location where the repository is storing the snapshots and snapshots themselves are untouched.

Could you please let me know how can I access this snapshot to restore the indices inside that

---

<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:** [January 20, 2020, 8:23am UTC](https://discuss.elastic.co/t/accessing-the-snapshot-after-deleting-the-repository/215682/2 "2020-01-20T08:23:58Z")

</div>

You should [register the repository](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-register-repository.html) again.

---

<div class="post-metadata">

**Author:** ![Stephy\_Jacob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephy_jacob/32/45032_2.png) [@Stephy\_Jacob](https://discuss.elastic.co/u/Stephy_Jacob)\
**Post date:** [January 20, 2020, 8:57am UTC](https://discuss.elastic.co/t/accessing-the-snapshot-after-deleting-the-repository/215682/3 "2020-01-20T08:57:18Z")

</div>

Hi @DavidTurner,

Should I register with the same repository name using the below command. I have forgotten the repository name which I have deleted. This was done a month back

PUT \_snapshot/repository\_name  
{  
"type": "s3",  
"settings": {  
"bucket": "xyz",  
"region": "us-east-1",  
"access\_key": "xxxxxxxxxxxxxxxxxxxx",  
"secret\_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  
}  
}

or is there a way I can point the snapshot to a new repository name using any other command

---

<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:** [January 20, 2020, 9:03am UTC](https://discuss.elastic.co/t/accessing-the-snapshot-after-deleting-the-repository/215682/4 "2020-01-20T09:03:32Z")

</div>

The repository name is not important, it's only used internally within Elasticsearch. As long as the details of the repository are the same you should be good.

---

<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 17, 2020, 9:03am UTC](https://discuss.elastic.co/t/accessing-the-snapshot-after-deleting-the-repository/215682/5 "2020-02-17T09:03:33Z")

</div>

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