...
Install Curator
Code Block pip install elasticsearch-curator
Create a Curator Configuration File (
curator.yml
)Code Block language yaml client: hosts: - 127.0.0.1 port: 9200 logging: loglevel: INFO logfile: /var/log/curator.log logformat: default blacklist: ['elasticsearch', 'urllib3']
Create a Curator Action File (
snapshot.yml
)Code Block language yaml 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
Create a Cron Job to Run Curator
Code Block 0 2 * * * curator --config /path/to/curator.yml /path/to/snapshot.yml
...