Deleting snapshot – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.6-7.7

Briefly, this error occurs when you attempt to delete a snapshot in Elasticsearch, but the operation fails. This could be due to a variety of reasons such as the snapshot being in use, insufficient permissions, or issues with the underlying storage. To resolve this issue, ensure that no restore operations are using the snapshot, check that the user has the necessary permissions to delete snapshots, and verify the health of the storage system where snapshots are stored. If the snapshot is corrupted, you may need to manually remove it from the repository.

This guide will help you check for common problems that cause the log ” deleting snapshot [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: snapshot.

Log Context

Log “deleting snapshot [{}]” classname is SnapshotsService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

     * @param listener listener
     * @param repositoryStateId the unique id for the state of the repository
     */
    private void deleteSnapshot(final Snapshot snapshot; final ActionListener listener; final long repositoryStateId;
                                final boolean immediatePriority) {
        logger.info("deleting snapshot [{}]"; snapshot);
        Priority priority = immediatePriority ? Priority.IMMEDIATE : Priority.NORMAL;
        clusterService.submitStateUpdateTask("delete snapshot"; new ClusterStateUpdateTask(priority) {

            boolean waitForSnapshot = false;

 

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?