org.apache.ignite

## Interface IgniteSnapshot

-     public interface IgniteSnapshot

  This interface provides functionality for creating cluster-wide cache data snapshots.

  Current limitations:

  - Snapshot will trigger PME (partition map exchange) to run itself.
  - Snapshot will be taken from all registered persistence caches to grantee data consistency between them.
  - Snapshot must be resorted manually on the switched off cluster by copying data to the working directory on each cluster node.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `IgniteFuture<Void>` | `cancelSnapshot(String name)` Cancel running snapshot operation.
    `IgniteFuture<Boolean>` | `cancelSnapshotRestore(String name)` Cancel snapshot restore operation.
    `IgniteFuture<Void>` | `createSnapshot(String name)` Create a consistent copy of all persistence cache groups from the whole cluster.
    `IgniteFuture<Void>` | `restoreSnapshot(String name, @Nullable Collection<String> cacheGroupNames)` Restore cache group(s) from the snapshot.

- - ### Method Detail

    - #### createSnapshot

          IgniteFuture<Void> createSnapshot(String name)

      Create a consistent copy of all persistence cache groups from the whole cluster.
      Parameters:
        `name` - Snapshot unique name which satisfies the following name pattern [a-zA-Z0-9_].
      Returns:
        Future which will be completed when a process ends.

    - #### cancelSnapshot

          IgniteFuture<Void> cancelSnapshot(String name)

      Cancel running snapshot operation. All intermediate results of cancelled snapshot operation will be deleted. If snapshot already created this command will have no effect.
      Parameters:
        `name` - Snapshot name to cancel.
      Returns:
        Future which will be completed when cancel operation finished.

    - #### restoreSnapshot

          IgniteFuture<Void> restoreSnapshot(String name,
                                             @Nullable
                                             @Nullable Collection<String> cacheGroupNames)

      Restore cache group(s) from the snapshot.

      NOTE: Cache groups to be restored from the snapshot must not present in the cluster, if they present, they must be destroyed by the user (eg with `IgniteCache.destroy()`) before starting this operation.

      Parameters:
        `name` - Snapshot name.
        `cacheGroupNames` - Cache groups to be restored or `null` to restore all cache groups from the snapshot.
      Returns:
        Future which will be completed when restore operation finished.

    - #### cancelSnapshotRestore

          IgniteFuture<Boolean> cancelSnapshotRestore(String name)

      Cancel snapshot restore operation.
      Parameters:
        `name` - Snapshot name.
      Returns:
        Future that will be finished when the process is complete on all nodes. The result of this future will be `false` if the restore process with the specified snapshot name is not running at all.

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.13.0
Release Date | : April 20 2022