Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Network Backups

How to create, restore, and remove GridGain network backups on NAS, NFS, or SFTP storage, including SFTP location configuration and JKS key setup.

GridGain provides a way to create network backups, allowing you to back up your cluster data to a network location such as NAS, NFS or SFTP for recovery purposes. Since the data is stored on a different physical device, network backups provide security against disk failures. The network location is used as a centralized storage where all cluster nodes can save data and then use it for recovery. Using centralized storage also lets you restore the cluster to a different physical location or even in the cloud.

If you want to restore the cluster to a different topology, refer to the Heterogeneous Recovery page.

Prerequisites

  • Snapshot functionality has to be enabled. Please refer to Snapshots & Recovery for instructions.

  • NAS or NFS storage: centralized storage has to be mounted to all machines hosting the cluster nodes and have the same path.

  • SFTP location: an SFTP server needs to be accessible from all GridGain cluster nodes. Follow this section to enable an SFTP location for GridGain backups.

Creating Network Backup

There are two ways to create a network backup:

  • Create a local (regular) snapshot and move it to a shared folder. This operation is unsupported for SFTP-based backups.

  • Create a snapshot directly into a shared folder.

These two approaches are discussed below.

Saving Snapshots Directly to Centralized Storage

This approach is not recommended if your NFS storage is slow (i.e. based on HDD disks). Instead, create local snapshots to a fast SSD and copy/move them to a remote folder afterwards.

You can tell GridGain to create a snapshot directly into the centralized storage by specifying a path:

snapshot-utility.sh snapshot -type=full -dest=/shared/folder
// Get a reference to the GridGain plugin.
GridGain gg = ignite.plugin(GridGain.PLUGIN_NAME);

// Get a reference to the Snapshots interface.
GridSnapshot snapshots = gg.snapshot();

// Create the snapshot. Data of all the caches will be added to the snapshot.
SnapshotFuture<Void> snapshotFuture = snapshots.createFullSnapshot(null,
        new File("/shared/folder/path/"), new SnapshotCreateParams(),
        "Snapshot has been created!");

// Wait until the snapshot is created.
snapshotFuture.get();

unsupported

Moving Snapshots to Centralized Storage

If you do not specify a snapshot location when creating a snapshot, each node will save its data to a local folder. In this case, the snapshot is stored on local drives of the cluster nodes. To move the data to a centralized storage, use either the move command of the Snapshots Management Tool or the Java API.

unsupported

Restoring from Network Backup

To restore a cluster from a network backup, use the centralized storage as a snapshot location:

unsupported

Each node computes which partitions belong to the local node and restores corresponding partitions from the centralized storage to the local storage.

Removing Network Backups

To remove a network backup use the means of the centralized storage, for example a file manager, an SFTP client, or a retention policy of the storage itself.

To see which snapshots the centralized storage holds, run the list command against that storage:

Each snapshot occupies one folder whose name ends with _<snapshot ID>.snapshot, with one folder per cluster node inside it. Removing that folder removes the snapshot from the centralized storage.

GridGain cannot remove network backups itself. The delete command only removes a snapshot from the local snapshot folder of each cluster node. The same applies to scheduled deletion: a schedule created with -command=delete prunes local snapshots only.

Configuring SFTP Location

To enable an SFTP location for GridGain backups, you need to provide org.gridgain.grid.persistentstore.snapshot.file.SftpConfiguration that includes several connectivity-related settings:

strictHostKeyChecking controls whether GridGain verifies the SFTP server's SSH host key before transferring snapshot data. When enabled, the host key must match an entry in the file set by knownHostsPath. If knownHostsPath isn't set, GridGain uses ~/.ssh/known_hosts of the account running the node instead. The connection fails if the key isn't found, or if knownHostsPath points to a file that doesn't exist or can't be read.

Follow the steps below to create a Java KeyStore (JKS) with the keys that Ignite can use to authenticate on your SFTP server:

  1. Generate certificates:

openssl req -x509 -newkey rsa:4096 -keyout myKey.pem -out cert.pem -days 365 -nodes

  1. Add a private key with its alias to the JKS:

keytool -v -importkeystore -srckeystore node.p12 -srcstoretype PKCS12 -destkeystore example.jks -deststoretype JKS -alias example_alias

  1. Confirm the following files are generated:

    • example.jks - the JKS file with alias=example_alias

    • myKey.pub - a public key to authenticate on the SFTP server

This page is: Copyright © 2026 MariaDB. All rights reserved.

Last updated

Was this helpful?