Create a new incremental snapshot inside a repository that contains the current state of the given tables and/or partitions and the cluster metadata.


CREATE SNAPSHOT repository_name.snapshot_name
{ TABLE ( table_ident [ PARTITION (partition_column = value [ , ... ])] [, ...] ) | ALL }
[ WITH (snapshot_parameter [= value], [, ...]) ]


Create a new incremental snapshot inside a repository.

A snapshot is a backup of the current state of the given tables and the cluster metadata at the point the CREATE SNAPSHOT query starts executing. Changes made after that are not considered for the snapshot.

A snapshot is fully qualified by its snapshot_name and the name of the repository it should be created in (repository_name). A snapshot_name must be unique per repository.


For snapshot names the same restrictions as for table names apply.

This is mainly because snapshot names will likely become stored as file or directory on disc and hence must be valid filenames.

Creating the snapshot operates on primary shards which are not currently relocated. If a shard is being relocated the snapshot of the shard is created when the relocation is completed.

A snapshot only backups the parts of the data that are not yet stored in the given repository by older snapshots, thus creating snapshots is incremental.

Snapshots can include one or more tables, each given as table_ident. It is also possible to include only single partitions given the values of the partition columns.

If ALL is used, every table in the cluster (except system tables, blob tables and information_schema tables) as well as all persistent settings and the full cluster metadata is included in the snapshot.


repository_name:the name of the repository to create the snapshot in as ident
snapshot_name:the name of the snapshot as ident
table_ident:The name (optionally schema-qualified) of an existing table that is to be included in the snapshot
partition_column:Column name by which the table is partitioned

WITH Clause

[ WITH (snapshot_parameter [= value], [, ...]) ]

The following configuration parameters can be used to modify how the snapshot is created:

wait_for_completion:(Default false) By default the request returns once the snapshot creation started. If set to true the request returns after the whole snapshot was created or an error occurred. The sys.snapshots table can be queried to track the snapshot creation progress if wait_for_completion has been set to false.
ignore_unavailable:(Default false) if a given table does not exist the command will fail by default. If set to true these tables are ignored and not included in the snapshot.