Created
September 7, 2022 20:40
-
-
Save djs-basil-sys/beef32e2917a0f8a3786628855e3c64a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure the source index is actually open | |
POST /source_index/_open | |
# Put the source index in read-only mode | |
PUT /source_index/_settings | |
{ | |
"settings": { | |
"index.blocks.write": "true" | |
} | |
} | |
# Clone the source index to the target name, and set the target to read-write mode | |
POST /source_index/_clone/target_index | |
{ | |
"settings": { | |
"index.blocks.write": null | |
} | |
} | |
# Wait until the target index is green; | |
# it should usually be fast (assuming your filesystem supports hard links). | |
GET /_cluster/health/target_index?wait_for_status=green&timeout=30s | |
# If it appears to be taking too much time for the cluster to get back to green, | |
# the following requests might help you identify eventual outstanding issues (if any) | |
GET /_cat/indices/target_index | |
GET /_cat/recovery/target_index | |
GET /_cluster/allocation/explain | |
# Delete the source index, or... | |
DELETE /source_index | |
# Allow writes back to the source index | |
PUT /source_index/_settings | |
{ | |
"index.blocks.read_only_allow_delete": null, | |
"index.blocks.write": null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment