Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Install Curator

    Code Block
    pip install elasticsearch-curator
  2. Create a Curator Configuration File (curator.yml)

    Code Block
    languageyaml
    client:
      hosts:
        - 127.0.0.1
      port: 9200
    logging:
      loglevel: INFO
      logfile: /var/log/curator.log
      logformat: default
      blacklist: ['elasticsearch', 'urllib3']
  3. Create a Curator Action File (snapshot.yml)

    Code Block
    languageyaml
    actions:
      1:
        action: snapshot
        description: "Snapshot selected indices"
        options:
          repository: my_backup
          name: snapshot-%Y%m%d%H%M
          ignore_unavailable: false
          include_global_state: false
        filters:
        - filtertype: pattern
          kind: prefix
          value: index_mumbkctcomobs.ipstorage.tatacommunications.com0

    Copy code

    actions: 1: action: snapshot description: "Snapshot selected indices" options: repository: my_backup name: snapshot-%Y%m%d%H%M ignore_unavailable: false include_global_state: false filters: - filtertype: pattern kind: prefix value: index_mumbkctcomobs.ipstorage.tatacommunications.com0

  4. Create a Cron Job to Run Curator

    Code Block
    0 2 * * * curator --config /path/to/curator.yml /path/to/snapshot.yml

...