Backup Of Elastic Cluster

Hi Team,

If we want to take backup of elastic cluster by using below command. Will it take backup everything in cluster like ILM Policy, SLM Policy and any settings related to cluster.

PUT _slm/policy/weekly-snapshots
{
  "schedule": "0 00 2 ? * 1",
  "name": <weeklysnap-{now/d}> ",
  "repository": "<repo-name>",
  "config": {
    "indices": ["*"],
    "include_global_state": true
  },
  "retention": {
    "expire_after": "30d",
    "min_count": 5,
   "max_count": 50
  }
}

Thanks,
Debasis

Hey Debasis,

That snapshot policy will back up all indices (because of "indices": ["*"]) and also the global cluster state since "include_global_state": true.

So yes — it will capture things like index templates, ILM and SLM policies, users/roles (if security is enabled), and other cluster-level settings.

Just keep in mind: some settings (like snapshots repositories themselves) aren’t stored inside snapshots, so you’d need to recreate those manually before restoring.

1 Like

Thanks @Rafa_Silva for confirmation. I would like to confirm that I have the most recent backup and that my previous cluster is no longer in operation. This means I can restore everything from the backup to the new cluster and proceed with my work as usual.

Thanks,
Debasis

You’re welcome! Yes, as long as your snapshot is recent and complete, you can restore it to a new cluster and continue working normally. Just make sure to recreate the snapshot repo in the new cluster first.

1 Like