Create several repositories in a single location


(sebastien) #1

Hi,

Despite reading documentation, I could not figure out all the details about "repositories" used to snapshot/restore indices from/to elasticsearch.

I configured a single snapshot/restore folder location for my E/S cluster thanks to path.repo field in .yml conf file : I put following line in the conf file :
path.repo: ["/myfolder/elasticsearch-backup"]

Then, I created a repository using following API:
PUT /_snapshot/snapshot_repo_one
{
"type": "fs",
"settings": {
"compress" : true,
"location": "/myfolder/elasticsearch-backup"
}
}

I create two snapshots in this repository:
PUT /_snapshot/snapshot_repo_one/snapshot-number-one?wait_for_completion=false
PUT /_snapshot/snapshot_repo_one/snapshot-number-two?wait_for_completion=false

Great, I am able to list these snapshots for the repository:
GET /_snapshot/snapshot_repo_one/_all
=> returns my 2 snapshots (snapshot-number-one & snapshot-number-two) :slight_smile:

Though, I tried to create a second repository in the same (single configured) location:
PUT /_snapshot/snapshot_repo_two
{
"type": "fs",
"settings": {
"compress" : true,
"location": "/myfolder/elasticsearch-backup"
}
}

I didn't create any snapshot in this new repository, but when I try to list the snapshots from this one, I get the same list as the previous one (snapshot-number-one & snapshot-number-two) ...:frowning:
GET /_snapshot/snapshot_repo_two/_all

Do you know why ? what did I miss about repositories & locations in the documentation ?
Thanks for your help

Sebastien


(system) #2

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