Snapshot deleted – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-7.7

Briefly, this error occurs when a snapshot, which is a backup of an Elasticsearch index, is deleted. This could be due to manual deletion, a script, or a policy that automatically deletes old snapshots. To resolve this, ensure that snapshots are not being deleted unintentionally. If it’s a script or policy, adjust it to prevent unwanted deletions. If the snapshot is needed, restore it from a backup if available. Always ensure to have a proper backup strategy in place to prevent data loss.

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

Log Context

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

            Repository repository = repositoriesService.repository(snapshot.getRepository());
            repository.getRepositoryData(ActionListener.wrap(repositoryData -> repository.deleteSnapshot(snapshot.getSnapshotId();
                repositoryStateId;
                minCompatibleVersion(minNodeVersion; snapshot.getRepository(); repositoryData; snapshot.getSnapshotId());
                ActionListener.wrap(v -> {
                        logger.info("snapshot [{}] deleted"; snapshot);
                        removeSnapshotDeletionFromClusterState(snapshot; null; l);
                    }; ex -> removeSnapshotDeletionFromClusterState(snapshot; ex; l)
                )); ex -> removeSnapshotDeletionFromClusterState(snapshot; ex; l)));
        }));
    }

 

 [ratemypost]

Opster
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.