Tutorial for Backup

Is there any working documentation for back up?

This link is what I can find
https://www.elastic.co/guide/en/elasticsearch/guide/current/backing-up-your-cluster.html
It does not work at all. Totally useless

There's additional snapshot/restore documentation at elastic.co. Anyway, you'll get better help if you explain what you're having problems with.

Did this in kibana sense

PUT /_snapshot/my_backup
{
"type": "fs",
"settings": {
location": "/home/elastic/logstash_scripts/123456"
}
}

Result

{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "failed to parse repository source [{\n "type": "fs"\n "settings": {\n location": "/home/elastic/logstash_scripts/123456"\n }\n}\n]"
}
],
"type": "illegal_argument_exception",
"reason": "failed to parse repository source [{\n "type": "fs"\n "settings": {\n location": "/home/elastic/logstash_scripts/123456"\n }\n}\n]",
"caused_by": {
"type": "json_parse_exception",
"reason": "Unexpected character ('"' (code 34)): was expecting comma to separate OBJECT entries\n at [Source: {\n "type": "fs"\n "settings": {\n location": "/home/elastic/logstash_scripts/123456"\n }\n}\n; line: 3, column: 4]"
}
},
"status": 400
}

There's a double quote missing from this line:

location": "/home/elastic/logstash_scripts/123456"

PUT /_snapshot/my_backup
{

"settings": {
"type": "fs",
"location": "/home/elastic/logstash_scripts/123456"
}
}

{
"error": {
"root_cause": [
{
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: type is missing;"
}
],
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: type is missing;"
},
"status": 400
}

Please look more carefully at the examples. The "type" key should be at the top level, not inside "settings".

PUT /_snapshot/my_backup
{
"type": "fs",
"settings": {

    "location": "/home/elastic/logstash_scripts"

}
}

Result

{
"error": {
"root_cause": [
{
"type": "repository_exception",
"reason": "[my_backup] location [/home/elastic/logstash_scripts] doesn't match any of the locations specified by path.repo"
}
],
"type": "repository_exception",
"reason": "[my_backup] failed to create repository",
"caused_by": {
"type": "creation_exception",
"reason": "Guice creation errors:\n\n1) Error injecting constructor, RepositoryException[[my_backup] location [/home/elastic/logstash_scripts] doesn't match any of the locations specified by path.repo]\n at org.elasticsearch.repositories.fs.FsRepository.(Unknown Source)\n while locating org.elasticsearch.repositories.fs.FsRepository\n while locating org.elasticsearch.repositories.Repository\n\n1 error",
"caused_by": {
"type": "repository_exception",
"reason": "[my_backup] location [/home/elastic/logstash_scripts] doesn't match any of the locations specified by path.repo"
}
}
},
"status": 500
}

Have you read what the documentation says about the path.repo setting?

Almost impossible to understand.

what does the following path mean?
path.repo: ["/mount/backups", "/mount/longterm_backups"]

I must have two path for backup? Which server will the backup reside in? I have nodes in different servers

I have done this settings but the above error message still appears

No, it's not impossible to understand. Your attitude is not helpful.

path.repo lists the paths where backup repositories are allowed.

I must have two path for backup?

No, that's just an example.

Which server will the backup reside in? I have nodes in different servers

The backup files will be stored in the path you specify. That path must be accessible from all nodes in the cluster. Which server that physically stores the files doesn't matter, but it's typically on an NFS server.

Can I set the path to e.g. c:\my_folder\backup? If I were to do this can I put this in the settings of the elasticsearch.yml in one of the Nodes?

The same directory needs to be accessible to all nodes which most likely isn't the case with c:\my_folder\backup. Even if you create such a directory on all nodes they will be different directories that just happens to share the same name for each ES process.

I have done the following

PUT /_snapshot/my_backup
{
"type": "fs",
"settings": {
"compress": "true",
"location": "\\191.0.0.16\Logs\ES_TEST"
}

What should I do next. How to get the backup to start? There is not information on how the backup will work.
}

Have you read the Snapshot section of the Snapshot And Restore chapter of the documentation?

Read it. It's very difficult to understand and very confusing.

Based on the information in the Snapshot section I can only conclude that there is no working backup feature in elasticsearch

Read it. It's very difficult to understand and very confusing.

Then I suggest you ask questions about the parts you find confusing.

Based on the information in the Snapshot section I can only conclude that there is no working backup feature in elasticsearch

I don't agree, but without more information from you I can't comment further.