Migrate to data tiers routing Added in 7.14.0
Switch the indices, ILM policies, and legacy, composable, and component templates from using custom node attributes and attribute-based allocation filters to using data tiers. Optionally, delete one legacy index template. Using node roles enables ILM to automatically move the indices between data tiers.
Migrating away from custom node attributes routing can be manually performed. This API provides an automated way of performing three out of the four manual steps listed in the migration guide:
- Stop setting the custom hot attribute on new indices.
- Remove custom allocation settings from existing ILM policies.
- Replace custom allocation settings from existing indices with the corresponding tier preference.
ILM must be stopped before performing the migration.
Use the stop ILM and get ILM status APIs to wait until the reported operation mode is STOPPED
.
Query parameters
-
dry_run boolean
If true, simulates the migration from node attributes based allocation filters to data tiers, but does not perform the migration. This provides a way to retrieve the indices and ILM policies that need to be migrated.
Body
-
legacy_template_to_delete string
-
node_attribute string
curl \
-X POST http://api.example.com/_ilm/migrate_to_data_tiers \
-H "Content-Type: application/json" \
-d '"{\n \"legacy_template_to_delete\": \"global-template\",\n \"node_attribute\": \"custom_attribute_name\"\n}"'
{
"legacy_template_to_delete": "global-template",
"node_attribute": "custom_attribute_name"
}
{
"dry_run": false,
"removed_legacy_template":"global-template",
"migrated_ilm_policies":["policy_with_allocate_action"],
"migrated_indices":["warm-index-to-migrate-000001"],
"migrated_legacy_templates":["a-legacy-template"],
"migrated_composable_templates":["a-composable-template"],
"migrated_component_templates":["a-component-template"]
}