elastic search snapshot and restore requests commands
PUT /_snapshot/my_backup
{
"type": "fs",
"settings": {
"location": "/home/kishlay/Documents/esbackup"
}
}
this may throw permission denied exception
so for that do
chmod 777 (folder path)
PUT /_snapshot/my_backup2
{
"type": "fs",
"settings": {
"location": "/home/kishlay/Documents/esbackup2"
}
}
GET /_snapshot/my_backup/snapshot
GET /_snapshot
PUT /_snapshot/my_backup/snapshot_2?wait_for_completion=true
{
"indices": "my_index4",
"ignore_unavailable": true,
"include_global_state": false
}
GET /_snapshot/my_backup/snapshot_2
DELETE /my_index4
POST /_snapshot/my_backup/snapshot_2/_restore
DELETE /khandialog
DELETE /khanscript
DELETE /_snapshot/my_backup/snapshot_2
PUT /_snapshot/my_backup2/snapshot_6?wait_for_completion=true
{
"indices": "khandialog,khanscript",
"ignore_unavailable": true,
"include_global_state": false
}
GET /_snapshot
GET /_cat/snapshots/
GET /_snapshot/my_backup/snapshot_
DELETE /_snapshot/my_backup2/snapshot_6
Get khandialog/_search
{
"query":{
"bool": {
"should": [
{ "multi_match": {
"query": "algebra",
"fields": [ "title", "description" , "script" ]
}}
],
"must":[
{ "match": { "subscriberUserIDs": "0" }}
]
}
}
}
Get khandialog/_search?q=knowledge
before creating or using snapshot we need to declare folder location in elasticsearch.yml
location of this file
/etc/elasticsearch/elasticsearch.yml
then add in file
before creating or using snapshot we need to declare folder location in elasticsearch.yml
location of this file
/etc/elasticsearch/elasticsearch.yml
then add in file
path.repo: ["/mount/backups", "/mount/longterm_backups"]
Link : https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
Comments
Post a Comment