I'm writing some code to help with 2.x to 5.x upgrades for our ES storage and followed the instructions I found here: Restore snapshot from ES 2.4 to ES 5.2 and it worked for me in all my testing, but when I deployed it on some upgrades I get this error:
{"error":{"root_cause":[{"type":"repository_exception","reason":"[backup] failed to update the repository index blob with indices data on startup"}],"type":"repository_exception","reason":"[backup] failed to update the repository index blob with indices data on startup","caused_by":{"type":"no_such_file_exception","reason":"/var/config/rest/elasticsearch/data/essnapshot/index.latest"}},"status":500}
And the file is indeed missing, but it's missing because I specifically deleted it per the instructions on the other thread. Given this works most of the time I'm hesitant to manually re-create the file when it seems like the restore takes care of that usually; any idea what is wrong in this setup?
Edit:
I did a test where after the upgrade I deleted the index.latest file from 2.x and manually created an empty index.latest file and the restore completed successfully so this apparently works but I'm still not sure why this works okay without this intervention in some cases but not others.
Thanks!