Bulk Read-only indexes on Upgrade Assistant from 8.19 to 9.1

I am upgrading an 8.19 cluster to 9.1 using the Upgrade Assistant after spinning it up from our current 7.17 snapshot. I unfortunately have over 2k indices that require action, most of them deprecated but in the process of moving their docs out of Elastic and into a long-term storage managed internally. I would like to avoid deletion at this point in time.

Is there a way of bulk updating the indices to read-only, or am I doomed to click on every single one of them? Solutions in this forum have not worked so far, such as setting “index.block.write“ or “index.read_only“ to true, to have the Upgrade Assistant validate the indices.

I did manage to find a solution through dev tools: the Kibana endpoint does take CSV index names. This worked for me:

POST kbn:api/upgrade_assistant/update_index/index_1,index_2,index_3...

{"operations":["blockWrite","unfreeze"]}
1 Like