I have a problem. I want to store an index that is in elasticsearch. I created a new repository for this and this repository does not have any snapshots. But when I ran the code blog below, it returned me the error message "Invalid snapshot name snapshot with the same name already in-progress ". How can I fix this problem?
I created a new repository with the following code block:
PUT /_snapshot/backup_repository
{
"type": "fs",
"settings": {
"compress" : "true",
"location": "C:/backups/backup_my_index"
}
}
just to be sure i used the code block below and the query returned me this result:
GET /_snapshot/backup_repository/_status
result:
{
"snapshots" : [ ]
}
I wanted to make a backup with the following code block:
PUT /_snapshot/backup_repository/my_snapshot?wait_for_completion=true
{
"indices": "my_index",
"ignore_unavailable": true,
"include_global_state": false,
"metadata": {
"taken_by": "busra duygu",
"taken_because": "backup for my_index"
}
}
Error :
{
"error" : {
"root_cause" : [
{
"type" : "invalid_snapshot_name_exception",
"reason" : "[backup_repository:my_snapshot] Invalid snapshot name [my_snapshot], snapshot with the same name is already in-progress"
}
],
"type" : "invalid_snapshot_name_exception",
"reason" : "[backup_repository:my_snapshot] Invalid snapshot name [my_snapshot], snapshot with the same name is already in-progress"
},
"status" : 400
}
I would be very happy if you could help me.
CodePudding user response:
To see if there is a snapshot that already exist with this name
GET /_snapshot/backup_repository/_all
You will also get the state of it (SUCCESS/FAILED,...)
CodePudding user response:
@ExploZe As you said i ran this query and it returned me the following result.
Query:
GET /_snapshot/backup_repository/_all
Result:
{
"snapshots" : [
{
"snapshot" : "my_snapshot",
"uuid" : "4Sv055VjQDSZvpBqSvCxpg",
"version_id" : 7100199,
"version" : "7.10.1",
"indices" : [
"my_index"
],
"data_streams" : [ ],
"include_global_state" : false,
"metadata" : {
"taken_by" : "busra duygu",
"taken_because" : "backup for my_index"
},
"state" : "IN_PROGRESS",
"start_time" : "2021-09-09T06:22:16.414Z",
"start_time_in_millis" : 1631168536414,
"end_time" : "1970-01-01T00:00:00.000Z",
"end_time_in_millis" : 0,
"duration_in_millis" : 0,
"failures" : [ ],
"shards" : {
"total" : 0,
"failed" : 0,
"successful" : 0
}
}
]
}