Snapshot Creation without replication

Hi Team,

I am trying to take snapshot without replication by setting index.number_of_replicas as "0"

POST /_snapshot/backup/snapshot_chr1
{
"indices": "es_chr",
"ignore_unavailable": "true",
"include_global_state": false,
"index_settings": {
"index.number_of_replicas": 0
}
}

But I am getting an error and is shown as below,

{
"error": "SnapshotCreationException[[backup:snapshot_chr1] failed to create snapshot]; nested: IOException[Stream Closed]; ",
** "status": 500**

}

Is it possible to do in elasticsearch?

Please guide us and it would be very helpful.

Thanks in Advance.

Regards,
Ganeshbabu R

Setting replicas is only valid during a restore - https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html#_changing_index_settings_during_restore

Thanks for your response @warkolm

Hi @warkolm,

We have a clarification in taking a snapshot for an index. We have an index

We need to know whether taking snapshot with 2 replicas is a good practice?

If you see the primary size of index 1.5 TB without replica and with 2 replicas the overall size of the index would be around 4.5 TB. Suppose if I take snapshot of item index with 2 replica then the snapshot size would be in the range 4.0 to 4.5 TB

Every day we plan to take incremental snapshot and I can say changes will be updated in the item index and size of the index grows simultaneously.

Please let us know your feedback.

Note:- How much storage space required for taking snapshot?

Regards,
Ganeshbabu R

Snapshot only applies to primaries, when we restore we recreate the replicas based off those primaries.

Thanks for the clarification @warkolm