Put SLM as per the documents complains about the index name?

Hello, I use elastic cloud and apart from the automatic backups that take place, I'd like to use SLM so we can have 2 sets of backups. Disaster recovery etc.

So I have been following this:

https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshot-lifecycle-management-api.html

I created my s3 bucket and it appears to work fine, I did a test snapshot manually and it wrote it into the bucket all seems well.

But now when I try to create a simple policy:

PUT /_slm/policy/nightly-snapshots
{
  "schedule": "0 30 1 * * ?", 
  "name": "<actual-s3-aws-{now/d}>", 
  "repository": "actual-s3-aws", 
  "config": { 
    "indices": ["*"] 
  },
  "retention": { 
    "expire_after": "30d", 
    "min_count": 5, 
    "max_count": 50 
  }
}

I get the following error:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "invalid_index_name_exception",
        "reason" : "Invalid index name [_slm], must not start with '_', '-', or '+'",
        "index_uuid" : "_na_",
        "index" : "_slm"
      }
    ],
    "type" : "invalid_index_name_exception",
    "reason" : "Invalid index name [_slm], must not start with '_', '-', or '+'",
    "index_uuid" : "_na_",
    "index" : "_slm"
  },
  "status" : 400
}

If I try to follow commands like GET _slm/status I get complaints about only allowing POST.

Is SLM just not available on elastic cloud or am I doing something really silly here?

This document suggest I should be able to do it:

The snapshot lifecycle management API and the features associated with it are currently available only in the Elastic Stack version 7.6 and above.

Hi. I'm having the same problem.
Any further updates on this case?

I figured out that the slm feature is not enabled. You can check that by using:

GET _xpack?categories=features&pretty

However, I don't know how to enable it in cloud service. I cannot update the elasticsearch.yml file. Any idea?

1 Like

It seems to be a bug. All of their documentation states it should be available, and if you look here it even has screenshots of sections within kibana that simply don't exist for elastic cloud yet.

I raised a support query to elastic.co, here is the documents I refer to:

https://www.elastic.co/guide/en/cloud/current/ec-restoring-snapshots.html

https://www.elastic.co/guide/en/kibana/7.5/snapshot-repositories.html

I think that maybe the SLM is disabled so Kibana doesn't show it.
Do you know how to enable SLM in Elastic cloud? I cannot find any document related to this.

According to the documents you need curl /_slm/start but ES doesn't appear to recognise that command.

I think that curl /_slm/start is used to start the SLM (start the automation of taking snapshots). To enable this feature, we need to use another method.

I got this back from support:

Snapshot Lifecycle Management (SLM) - We’ve added support for the SLM stack feature. This provides additional snapshot/restore capabilities beyond the native Cloud “snapshotter” feature such as a UI for managing custom snapshot repos and more flexibility when configuring snapshot schedules. ESS will also now use SLM for snapshot management for all clusters of version 7.6 or higher.

Migrating from index curation to ILM - For users that are running hot-warm deployments on older versions, we've added a "one-click" migration path from the native ESS index curation to stack ILM. This automated migration allows older hot-warm deployments to easily take advantage of all the benefits of ILM.

FYI on SLM - Currently it is only available for new 7.6.0+ deployments and deployments that have upgraded to a 7.6.0+ version since March 12th ish. The gap here is for deployments that were already on 7.6.1 prior to March 12th, there is no newer version to upgrade to to kick off the migration to SLM. These deployments will either need to wait until 7.6.2 is out to upgrade to or get intervention from a Cloud engineer.

For the record, I went from 7.6.0 to 7.6.1 after this date and it still didn't enable.

I just updated from 7.6.0->7.6.1 yesterday but It still didn't work.

Any update on this??

None :frowning:

I got the support from support@elastic.co and they helped me to enable the SLM from their backend. You should also ask them to do so.
Good luck :smiley:

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