Incremental Snapshot in Elasticsearch


(Hemant Gupta) #1

Continuing the discussion from [ES-1.4.2] Snapshot FS Repository directory structure:

Hi Elasticsearch Champs:

I have managed to make a script for Elasticsearch snapshot and restore but I really wanted to override same snapshot over and over it so that only the changes i update in ES index that changes only got snapshot on the same snapshot i.e incremental update..

Please need your suggestion on this:

root@ip-10-1-0-115:/etc/elasticsearch# curl -XPUT 'localhost:9200/_snapshot/my_backup/snapshot_2?pretty' -H 'Content-Type: application/json' -d'
{
"indices": "test-index",
"ignore_unavailable": true,
"include_global_state": false
}
'
{
"accepted" : true
}

root@ip-10-1-0-115:/etc/elasticsearch# curl -XPUT 'localhost:9200/_snapshot/my_backup/snapshot_2?pretty' -H 'Content-Type: application/json' -d'
{
"indices": "test-index",
"ignore_unavailable": true,
"include_global_state": false
}
'
{
"error" : {
"root_cause" : [
{
"type" : "snapshot_creation_exception",
"reason" : "[my_backup:snapshot_2/wIr2rgXtTYmzT8mkTIXz3g] snapshot with the same name already exists"
}
],
"type" : "snapshot_creation_exception",
"reason" : "[my_backup:snapshot_2/wIr2rgXtTYmzT8mkTIXz3g] snapshot with the same name already exists"
},
"status" : 500
}

So as per above I just wanted to make sure that same snapshot:snapshot_2 should be able to override...


(Mark Walkom) #2

You'd need to delete the existing snapshot to use the same name.


(Hemant Gupta) #3

Hi ,

I just wanted to understand how incremental snapshot works in Elasticsearch..Wanted to clear one thing if I make a snapshot A of an index test then do some changes like add/delete documents then make another snapshot so during the snapshot process only the changes i did for add/delete in an index will be snapshot not the complete index snapshot only changes will be snapshot???


(Christian Dahlqvist) #4

No, snapshots are incremental at the segment level. In addition to the docs, this blog post described how it works quite well even if it is getting a bit old.


(system) #5

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