Troubleshoot snapshot and index lifecycle management
Stack
If the automatic snapshot lifecycle management (SLM) or index lifecycle management (ILM) service is not operating as expected, you might need to check its lifecycle status, stop, or restart the service. You may also want to halt services during routine maintenance.
All of the procedures on this page use the Elasticsearch APIs. To run these steps using Kibana:
Log in to the Elastic Cloud console.
On the Hosted deployments panel, click the name of your deployment.
NoteIf the name of your deployment is disabled your Kibana instances might be unhealthy, in which case contact Elastic Support. If your deployment doesn’t include Kibana, all you need to do is enable it first.
Open your deployment’s side navigation menu (placed under the Elastic logo in the upper left corner) and go to Dev Tools > Console.
Use the Dev Tools Console to run the API requests as described.
Follow these steps to check the current SLM status, and to stop or restart it as needed.
To see the current status of the SLM service, use the SLM status API:
GET _slm/status
Under normal operation, the response shows SLM is RUNNING
:
{
"operation_mode": "RUNNING"
}
You can stop snapshot lifecycle management to suspend management operations for all snapshots. For example, you might stop SLM to prevent it from taking scheduled snapshots during maintenance or when making cluster changes that could be impacted by snapshot operations.
To stop the SLM service and pause execution of all lifecycle policies, use the SLM stop API:
POST _slm/stop
Stopping SLM does not stop any snapshots that are in progress. You can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped.
The response will look like this:
{
"acknowledged": true
}
Verify that snapshot lifecycle management has stopped:
GET _slm/status
The response will look like this:
{
"operation_mode": "STOPPED"
}
In the event that automatic snapshot lifecycle management is disabled, new backup snapshots will not be created automatically.
To restart the SLM service, use the SLM start API.
POST _slm/start
The response will look like this:
{
"acknowledged": true
}
Verify the snapshot lifecycle management is now running:
GET _slm/status
The response will look like this:
{
"operation_mode": "RUNNING"
}
Follow these steps to check the current ILM status, and to stop or restart it as needed.
To see the current status of the ILM service, use the ILM status API:
GET _ilm/status
Under normal operation, the response shows ILM is RUNNING
:
{
"operation_mode": "RUNNING"
}
You can also View the lifecycle status of an index or data stream for further information.
By default, the index lifecycle management service is in the RUNNING
state and manages all indices that have lifecycle policies.
You can stop ILM to suspend management operations for all indices. For example, you might stop index lifecycle management when performing scheduled maintenance or making changes to the cluster that could impact the execution of ILM actions.
When you stop ILM, SLM operations are also suspended. No snapshots will be taken as scheduled until you restart ILM. In-progress snapshots are not affected.
To stop the ILM service and pause execution of all lifecycle policies, use the ILM stop API:
POST _ilm/stop
The response will look like this:
{
"acknowledged": true
}
The ILM service runs all policies to a point where it is safe to stop.
While the ILM service is shutting down, run the status API to verify that ILM is stopping:
GET _ilm/status
The response will look like this:
{
"operation_mode": "STOPPING"
}
Once all policies are at a safe stopping point, ILM moves into the STOPPED
mode:
{
"operation_mode": "STOPPED"
}
If the automatic index lifecycle management or snapshot lifecycle management service is not working, you might need to restart the service.
To restart ILM and resume executing policies, use the ILM start API. This puts the ILM service in the RUNNING
state and ILM begins executing policies from where it left off.
POST _ilm/start
The response will look like this:
{
"acknowledged": true
}
Verify that index lifecycle management is now running:
GET _ilm/status
The response will look like this:
{
"operation_mode": "RUNNING"
}