Snapshot backup via api not working as expacted

I am running backup via bash and it is working successfully but backing up lot of unwanted backup with it.

here is code

for indice in daily_check_index-2023
do

curl -XPUT -u ${elk_admin_user}:${elk_admin_password} "${URL}/_snapshot/${indice}/${today}?wait_for_completion=true" -H "Content-Type: application/json" -d"
{
    \"indices\": \"${indice}\",
     \"ignore_unavailable\": true
}"
done

this suppose to create only indices backup of "daily_check_index-2023" but it is also making backup of lot of hidden index with it? how do I avoid it?
is my syntax is wrong?

for example some of the backup

{"snapshot":{"snapshot":"07dec2023","uuid":"0XacBksBRfGFFwlgb78Wig","repository":"daily_check_index-2023","version_id":8050399,"version":"8.5.3","indices":[".kibana_4",".security-profile-8",".kibana_9",".transform-internal-007",".kibana_3",".apm-custom-link",".kibana_8.5.3_001"....]

By default a create-snapshot request includes the cluster state, and therefore all feature state indices too. See these docs, particularly the paragraphs on the include_global_state and feature_states options.

1 Like

oh nice, I added include_global_state: false and all good.

1 Like

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