Backup and store data in Elastic search


(RAMESH KUMAR BAPANAPALLI) #1

Hi team,We are using ELK 5.5.2 stack in our organization in a windows machine had free space of 250 GB,please let me know how to take backup and restore data in Elastic search 5.5.2.


(David Pilato) #2

Here we go: https://www.elastic.co/guide/en/elasticsearch/reference/5.6/modules-snapshots.html


(RAMESH KUMAR BAPANAPALLI) #3

Step1: created local folder and updated that path in es.yml file
Step2:created repository
PUT /_snapshot/ESBackup
{ "type": "fs",
"settings": {
"location": "jupiterindex3",
"compress": "true"
}}
step3:backup start
PUT /_snapshot/ESBackup
{
"indices": "jupiterindex3",
"ignore_unavailable": true,
"include_global_state": false
}
error as shown below:

"error": {
"root_cause": [
{
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: type is missing;"
}
]
Step4: added type of index
PUT /_snapshot/ESBackup
{ "type": "fs",
"settings": {
"location": "jupiterindex3",
"compress": "true",
"type":"logs"
}}

PUT /_snapshot/ESBackup
{
"indices": "jupiterindex3",
"type":"logs",
"ignore_unavailable": true,
"include_global_state": false
}
Again another error came:
"error": {
"root_cause": [
{
"type": "repository_exception",
"reason": "[ESBackup] repository type [logs] does not exist"
}

Please let me know what to do.


(David Pilato) #4

When running the snapshot you need to give it an id:

PUT /_snapshot/my_backup/snapshot_1?wait_for_completion=true

(RAMESH KUMAR BAPANAPALLI) #5

superb, its working.thanks alot.


(RAMESH KUMAR BAPANAPALLI) #6

hi,
in es.yml file i mentioned path.repo: ["D:\Temp\ESBackup"] so it created new repositoy i can able to take backup to d drive but my requirement is to take backup to remote location as below
path.repo: ["\10.13.44.80:\Temp\ESBackup"]
Please suggest how to point remote path as backup location


(David Pilato) #7

The path needs to be a shared folder.
The way you mount it locally is up to you and not something elasticsearch specific.

If you can run ls \10.13.44.80:\Temp\ESBackup from all nodes, then that should work.


(system) #8

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