# How to recover indices from missing translog file

**URL:** https://discuss.elastic.co/t/how-to-recover-indices-from-missing-translog-file/52145
**Category:** Elasticsearch
**Created:** [June 8, 2016, 3:27am UTC](https://discuss.elastic.co/t/how-to-recover-indices-from-missing-translog-file/52145 "2016-06-08T03:27:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![suhae](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@suhae](https://discuss.elastic.co/u/suhae)
#### Post date: [June 8, 2016, 3:27am UTC](https://discuss.elastic.co/t/how-to-recover-indices-from-missing-translog-file/52145/1 "2016-06-08T03:27:21Z")

</div>

hello.  
i have something to ask earnestly.  
my ES version is 2.2.1.  
i have following error :

> [2016-06-08 11:52:55,369][WARN][cluster.action.shard] [Nate Grey] [lab][4] received shard failed for target shard [[lab][4], node[PqmsZ-a1SdqP9zfwyouzGg], [P], v[717], s[INITIALIZING], a[id=X8XGg8JvSvySbM9UbzzfCw], unassigned\_info[[reason=ALLOCATION\_FAILED], at[2016-06-08T02:52:55.349Z], details[failed recovery, failure IndexShardRecoveryException[failed to recovery from gateway]; nested: EngineCreationFailureException[failed to create engine]; nested: NoSuchFileException[/home/ubuntu/elasticsearch-2.2.1/data/elasticsearch/nodes/0/indices/lab/4/translog/translog-68.ckp]; ]]], indexUUID [e5fCkcSLT9WDFWc6C2faGw], message [failed recovery], failure [IndexShardRecoveryException[failed to recovery from gateway]; nested: EngineCreationFailureException[failed to create engine]; nested: NoSuchFileException[/home/ubuntu/elasticsearch-2.2.1/data/elasticsearch/nodes/0/indices/lab/4/translog/translog-68.ckp]; ]  
> [lab][[lab][4]] IndexShardRecoveryException[failed to recovery from gateway]; nested: EngineCreationFailureException[failed to create engine]; nested: NoSuchFileException[/home/ubuntu/elasticsearch-2.2.1/data/elasticsearch/nodes/0/indices/lab/4/translog/translog-68.ckp];  
> at org.elasticsearch.index.shard.StoreRecoveryService.recoverFromStore(StoreRecoveryService.java:250)  
> at org.elasticsearch.index.shard.StoreRecoveryService.access$100(StoreRecoveryService.java:56)  
> at org.elasticsearch.index.shard.StoreRecoveryService$1.run(StoreRecoveryService.java:129)  
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
> at java.lang.Thread.run(Thread.java:745)  
> Caused by: [lab][[lab][4]] EngineCreationFailureException[failed to create engine]; nested: NoSuchFileException[/home/ubuntu/elasticsearch-2.2.1/data/elasticsearch/nodes/0/indices/lab/4/translog/translog-68.ckp];  
> at org.elasticsearch.index.engine.InternalEngine.(InternalEngine.java:155)  
> at org.elasticsearch.index.engine.InternalEngineFactory.newReadWriteEngine(InternalEngineFactory.java:25)  
> at org.elasticsearch.index.shard.IndexShard.newEngine(IndexShard.java:1510)  
> at org.elasticsearch.index.shard.IndexShard.createNewEngine(IndexShard.java:1494)  
> at org.elasticsearch.index.shard.IndexShard.internalPerformTranslogRecovery(IndexShard.java:969)  
> at org.elasticsearch.index.shard.IndexShard.performTranslogRecovery(IndexShard.java:941)  
> at org.elasticsearch.index.shard.StoreRecoveryService.recoverFromStore(StoreRecoveryService.java:241)  
> ... 5 more  
> Caused by: java.nio.file.NoSuchFileException: /home/ubuntu/elasticsearch-2.2.1/data/elasticsearch/nodes/0/indices/lab/4/translog/translog-68.ckp  
> at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)  
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)  
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)  
> at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)  
> at java.nio.file.Files.newByteChannel(Files.java:361)  
> at java.nio.file.Files.newByteChannel(Files.java:407)  
> at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)  
> at java.nio.file.Files.newInputStream(Files.java:152)  
> at org.elasticsearch.index.translog.Checkpoint.read(Checkpoint.java:82)  
> at org.elasticsearch.index.translog.Translog.recoverFromFiles(Translog.java:330)  
> at org.elasticsearch.index.translog.Translog.(Translog.java:179)  
> at org.elasticsearch.index.engine.InternalEngine.openTranslog(InternalEngine.java:208)  
> at org.elasticsearch.index.engine.InternalEngine.(InternalEngine.java:151)  
> ... 11 more

and really translog files(translog-68.ckp and translog-69.ckp) does not exist in the path that NoSuchFileException pointed.  
how can i handle this?

Thank you.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [June 9, 2016, 12:12am UTC](https://discuss.elastic.co/t/how-to-recover-indices-from-missing-translog-file/52145/2 "2016-06-09T00:12:09Z")

</div>

Try `touch`ing the file to create them and see if it likes that.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 5, 2017, 10:45pm UTC](https://discuss.elastic.co/t/how-to-recover-indices-from-missing-translog-file/52145/3 "2017-07-05T22:45:13Z")

</div>


