Snapshot snapName not found in repository repoName – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.8-8.9

Briefly, this error occurs when Elasticsearch is unable to locate the specified snapshot in the given repository. This could be due to the snapshot being deleted, renamed, or not existing in the first place. To resolve this issue, you can verify the snapshot name and repository name for any typos or case sensitivity issues. If the snapshot was deleted, you may need to recreate it. If it was renamed, use the updated name. Lastly, ensure the snapshot actually exists in the repository you’re referencing.

This guide will help you check for common problems that cause the log ” snapshot [” + snapName + “] not found in repository [” + repoName + “] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: repository, plugin, snapshot.

Log Context

Log “snapshot [” + snapName + “] not found in repository [” + repoName + “]” class name is TransportMountSearchableSnapshotAction.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 final Optional matchingSnapshotId = repoData.getSnapshotIds()
 .stream()
 .filter(s -> snapName.equals(s.getName()))
 .findFirst();
 if (matchingSnapshotId.isEmpty()) {
 throw new ElasticsearchException("snapshot [" + snapName + "] not found in repository [" + repoName + "]");
 }
 final SnapshotId snapshotId = matchingSnapshotId.get();  final IndexMetadata indexMetadata = repository.getSnapshotIndexMetaData(repoData; snapshotId; indexId);
 if (indexMetadata.isSearchableSnapshot()) {

 

 [ratemypost]