After Deleting the older snapshots, it deleted first full snapshot


(Vishwanath) #1

Hi,

I have about 10 Older snapshots for Elasticsearch. If i delete the 8 older snapshot leaving current 2 of them. It is deleting the full snapshot which was created at first.
So if i take now another snapshot, will it be incremental or full snapshot?

Thank you in advance.


(David Pilato) #2

You need to think about every single snapshot as a full backup. Which means that you can remove whatever snapshots you wish, it won't have any impact on the other ones which integrity is still guaranteed.

Behind the scene, snapshots are incremental but this is an implementation detail.

So if i take now another snapshot, will it be incremental or full snapshot?

Consider it as a full snapshot again. It might end up copying lot of data depending on what happened on a segment level between the last available snapshot and this new one.

HTH


(Vishwanath) #3

Hi David,

Thanks for the information.

If we want to restore the ES from latest snapshot, we just have to give the name of recent snapshot name in the restore curl command. Am i right? If wrong please correct me.

Thankyou


(David Pilato) #4

That’s correct.


(Vishwanath) #5

Thanks David.

What is the difference between "active_primary_shards" and "active_shards".

docker exec -it es-node-2 curl localhost:9200/_cluster/health?pretty
{
  "cluster_name" : "elasticsearch",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 3,
  "number_of_data_nodes" : 3,
  "active_primary_shards" : 282,
  "active_shards" : 396,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0
}

Since whenever i take snapshot it shows

"state" : "SUCCESS",
"start_time" : "2017-10-03T04:52:48.586Z",
"start_time_in_millis" : 1507006368586,
"end_time" : "2017-10-03T04:52:54.121Z",
"end_time_in_millis" : 1507006374121,
"duration_in_millis" : 5535,
"failures" : [ ],
"shards" : {
"total" : 282,
"failed" : 0,
"successful" : 282
}
}
}

So has it taken the full backup? Or is it taking only "active_primary_shards" backup?

Thankyou


(David Pilato) #6

What is the difference between "active_primary_shards" and "active_shards".

You have primaries and replicas.

active_shards = primaries + replicas.
active_primary_shards = primaries.

Is it taking only "active_primary_shards" backup?

Yes

So has it taken the full backup?

Yes. You don't want to backup copies of shards as you already have a copy of the primaries.

I mean: everything is ok here.


(Vishwanath) #7

Thanks a lot David, for your help and information.


(system) #8

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