Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Snapshot/Restore: Add ability to restore partial snapshots #5742
Is there a way to copy a single index from a snapshot marked as "incomplete" by the restore function to the data dir of a single node elastic cluster in order to restore that index data by reopening it as a closed index?
eg, to restore a single index from a multi-index snapshot (an index marked as incompleted).
from whatever source location with a dir structure like:
will elasticsearch see this as a closed index and provide the ability to online it again?
Failing that, is there any other possible way to salvage data from a snapshotted index that is marked as incomplete, especially if the size of the index appears to be correct?
You should be able to restore all indices that were successfully snapshotted except the incomplete index by excluding the incomplete index from the restore operation:
There is no way simple to force incomplete index to be restored at the moment. What type of failures do you see when you run the following command:
I have it working. :)
You can adjust the metadata files in the snapshot to allow the restore to work.
After restoring the incomplete index, I get an incomplete/uninitialisable shard that must be replaced with a blank one from a temporary index to get the cluster back to green (as I was able to prove the data for that shard was simply missing from the snapshot.)
But an override to the usual behaviour would be nice to do the following:
I do realise that once again my case is probably an edge case so not that high priority compared to other features/bugs. :)