liveBook · Manning

Snapshot

As explained in Elasticsearch in Action, Second Edition

A snapshot is a point-in-time backup of Elasticsearch index data and cluster state that can be restored later.

A snapshot backs up Elasticsearch indexes, data streams, and cluster state to durable storage so selected data or an entire cluster can be restored later. Snapshots belong in an off-cluster repository, such as a filesystem, HDFS, or cloud storage, and are suited to regularly automated backups. section 14.4 section 14.4.1

Use the snapshot lifecycle in three stages:

  • Register a repository before storing snapshots. section 14.4.1
  • Create a full or selective snapshot through the REST API or Kibana. After the first backup, later snapshots store incremental updates rather than full copies. section 14.4.1 section 14.4.3
  • Restore an index, a set of indexes, or the full cluster from the registered repository when recovery or migration is required. section 14.4.1 section 14.4.5

Back up production search data

Create a complete snapshot with `PUT _snapshot/es_cluster_snapshot_repository/prod_snapshot_oct22`. To limit the backup, send an `indices` array such as `["*movies*", "*reviews*", "-*.old"]`; attach a `metadata` object when the snapshot needs incident or request details. Delete an obsolete snapshot with `DELETE _snapshot/es_cluster_snapshot_repository/custom_prod_snapshots` to reclaim repository space. section 14.4.3 section 14.4.5

Figure 14.9 Mechanics of snapshot and restore on a cluster

Follow the cluster-level flow from durable repository storage through snapshot creation and on-demand restoration. section 14.4

How Elasticsearch in Action, Second Edition covers it

How deep it goes
Explains repository registration, full or selective creation, incremental backups, restoration, metadata, and deletion through REST and Kibana.
Examples
Uses production snapshot names, movie and review index patterns, excluded old indexes, incident metadata, and HTTP deletion.
What it assumes
Assumes basic Elasticsearch administration and REST or Kibana use while teaching repository registration and snapshot workflow.
What you can do after
Operate/configure Elasticsearch backups by registering repositories, creating targeted snapshots, restoring data, and deleting snapshots.
How it connects
Connects backup and restore with repositories, indexes, data streams, cluster state, cloud storage, and index migration.

Also explained in

Compare how 11 books explain snapshot →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Elasticsearch in Action, Second Edition. The section links point to the parts of the book it draws on.