Restore elastic search from backup

Hi There,

I want to restore indexes from elasticsearch backup on a windows machine.

copied the zip file(es_20170911) to a folder es_backup and extracted it
so the path is c:\backup\es_backup\es_20170911
Step I had done are

register the repository in elastic search

for that

I had done curl -XPUT 'http://localhost:9200/_snapshot/es_snap?verify=false&pretty' -d '{"type":"fs", "settings":{"location":"\\PC-ASSET-2\backup\es-backup\es_backup_20170911","compress":true}}'

I am getting the following error

Invoke-WebRequest : Parameter cannot be processed because the parameter name 'd' is ambiguous. Possible matches
include: -DisableKeepAlive -Debug.
At line:1 char:67

  • curl -XPUT 'localhost:9200/_snapshot/es_snap?verify=false&pretty' -d '{"type":"f ...
  •                                                               ~~
    • CategoryInfo : InvalidArgument: (:slight_smile: [Invoke-WebRequest], ParameterBindingException
    • FullyQualifiedErrorId : AmbiguousParameter,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Please help me this issue to be resolved.

I had tried with instead of localhost and tried removing d option and several combinations but the error is not get resolved.

The above steps I had tried in windows administrator powershell

I had tried the same above steps on postman with put and url with raw plain text option. it is throwing 406 not acceptable erro


#curl -XPOST "localhost:9200/_snapshot/my_backup/snapshot_1/_restore?wait_for_completion=true"

Is this the above command I have use after registering the repository? Please confirm.

Please help me in resolving this issue.

With Many Thanks,

Bharath AK

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