Repository is on a pre-5.0 format with an index file that contains snapshot but – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 5-5

Briefly, this error occurs when Elasticsearch encounters a snapshot repository that is in a format prior to version 5.0. This older format is incompatible with newer versions of Elasticsearch. To resolve this issue, you can either upgrade the repository to a newer format or delete and recreate it. Alternatively, you can restore the snapshot to an Elasticsearch cluster that supports the older format, then reindex the data into a newer version of Elasticsearch.

This guide will help you check for common problems that cause the log ” [{}] repository is on a pre-5.0 format with an index file that contains snapshot [{}] but ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: blobstore, repositories and repository-azure.

Log Context

Log “[{}] repository is on a pre-5.0 format with an index file that contains snapshot [{}] but” classname is BlobStoreRepository.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

for (final SnapshotId snapshotId : repositoryData.getSnapshotIds()) {
            final SnapshotInfo snapshotInfo;
            try {
                snapshotInfo = getSnapshotInfo(snapshotId);
            } catch (SnapshotException e) {
                logger.warn((Supplier>) () -> new ParameterizedMessage("[{}] repository is on a pre-5.0 format with an index file that contains snapshot [{}] but " +
                        "the corresponding snap-{}.dat file cannot be read. The snapshot will no longer be included in " +
                        "the repository but its data directories will remain."; getMetadata().name(); snapshotId; snapshotId.getUUID()); e);
                continue;
            }
            for (final String indexName : snapshotInfo.indices()) {

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?