Curator cannot find existing Repository

Trying to setup Curator to run automatic snapshots of old indices in my cluster, but I cannot get it to recognize an existing repository to start the snapshot process.

On my test cluster, I have successfully created a repository called "Archive"

GET _cat/repositories?v returns:

id type
Archive fs

I've even successfully created a snapshot:
GET _snapshot/Archive/snapshot_1 returns:

{
  "snapshots": [
    {
      "snapshot": "snapshot_1",
      "uuid": "p6TN8K2qRGaBlTzoRSfv6A",
      "version_id": 5040199,
      "version": "5.4.1",
      "indices": [
        "winlogbeat-2017.05.11",
        "winlogbeat-2017.05.12"
      ],
      "state": "SUCCESS",
      "start_time": "2017-11-30T19:51:31.691Z",
      "start_time_in_millis": 1512071491691,
      "end_time": "2017-11-30T19:52:18.587Z",
      "end_time_in_millis": 1512071538587,
      "duration_in_millis": 46896,
      "failures": [],
      "shards": {
        "total": 10,
        "failed": 0,
        "successful": 10
      }
    }
  ]
}

But if I try to run a snapshot from Curator, I get the following in my logs:

2017-11-30 15:29:21,996 INFO      Preparing Action ID: 1, "snapshot"
2017-11-30 15:29:22,007 INFO      Trying Action ID: 1, "snapshot": snapshot old indices to archival storage
2017-11-30 15:29:26,256 ERROR     Failed to complete action: snapshot.  <class 'curator.exceptions.ActionError'>: Cannot snapshot indices to missing repository: Archive

Action file looks like this:

actions:
  1:
    action: snapshot
    description: snapshot old indices to archival storage
    options:
        repository: Archive
        wait_for_completion: True

What am I missing? Is there a way I need to call out the repository name to get Curator to recognize it?

If you have Curator, you should also have the es_repo_mgr command installed:

$ es_repo_mgr
Usage: es_repo_mgr [OPTIONS] COMMAND [ARGS]...

  Repository manager for Elasticsearch Curator.

Options:
  --config PATH  Path to configuration file. Default: ~/.curator/curator.yml
  --help         Show this message and exit.

Commands:
  create  Create an Elasticsearch repository
  delete  Delete an Elasticsearch repository
  show    Show all repositories

If you have a properly configured ~/.curator/curator.yml file, then all you should need to do to verify the repository is visible to Curator is:

$ es_repo_mgr show
MY_REPO_NAME

If you see the repository here, and it still gives you the not found error, please re-run with loglevel: DEBUG set in your config yaml file. I'd need to see the debug-level messages prior to this error.

1 Like

Thanks for the fast response -

es_repo_mgr show returns no results.

I also tried running
**es_repo_mgr.exe --config .\config.yml create fs --repository Carchive --location \\\\(server)\\(share)**

the script returned no errors, but show still reports no repositories.

Or, I could have made a very dumb mistake...

My curator config is pointing to prod cluster, but the repo I created was on my test node. I'm going to hang my head and go back to testing.

Thanks for pointing out the es_repo_mgr tool, it helped me find my slip-up.

1 Like

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