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))); })); }