I have to transfer an Elasticsearch index on a Windows machine to an Ubuntu Machine. I decided to take a snapshot of the index and then try to restore it on the other system.
I was successfully able to snapshot the index on the windows machine.
On the windows machine in elasticsearch.yml
I had path.repo: ["F:\\mount\\backups"]
.
So, under mount
I had:
.
└── backups
└── old_backup
├── index
├── indices
│ └── old_index
│ ├── 0
│ ├── 1
│ ├── 2
│ ├── 3
│ ├── 4
│ └── meta-snapshot_to_ubuntu.dat
├── meta-snapshot_to_ubuntu.dat
└── snap-snapshot_to_ubuntu.dat
where snapshot_to_ubuntu
is the name of the snapshot I made on Windows.
I placed this snapshot in ~/Documents/mount
on the ubuntu machine and start an instance of ES 2.3.0 with path.repo: ["/home/animesh/Documents/mount/backups"]
in elasticsearch.yml
.
I run the following on the command line:
curl -XGET localhost:9200/_snapshot/old_backup/snapshot_to_ubuntu?pretty=1
and get
{
"error" : {
"root_cause" : [ {
"type" : "repository_missing_exception",
"reason" : "[old_backup] missing"
} ],
"type" : "repository_missing_exception",
"reason" : "[old_backup] missing"
},
"status" : 404
}
Where am I going wrong?
UPDATE:
I ran the following curl command:
curl -X POST http://localhost:9200/_snapshot/old_backup/snapshot_to_ubuntu/_restore
and I get:
{
"error": {
"root_cause": [
{
"type": "repository_missing_exception",
"reason": "[old_backup] missing"
}
],
"type": "repository_missing_exception",
"reason": "[old_backup] missing"
},
"status": 404
}