Snapshots Management Tool
GridGain Ultimate Edition includes a command line tool that simplifies snapshot creation, recovery, and the management of related tasks.
The script that starts the tool is called snapshot-utility
and is located in the {GRIDGAIN_HOME}/bin/
folder. The script is available for Unix-based systems (snapshot-utility.sh
) and for Windows (snapshot-utility.bat
).
The tool supports the following commands:
-
HELP
-
LIST
-
INFO
-
SNAPSHOT
-
RESTORE
-
CHECK
-
DELETE
-
MOVE
-
STATUS
-
CATALOG
-
CANCEL
-
SCHEDULE
To call a specific command, use the following format:
snapshot-utility.sh [command] <command arguments> <connection parameters> <output parameters>
snapshot-utility.bat <command> <args> <connection parameters> <output parameters>
-
<command arguments>
– command-specific parameters. -
<connection parameters>
– connection parameters the tool uses to connect to a cluster node. These parameters are required for the commands that are executed on the cluster’s nodes (list
,info
,snapshot
,restore
,check
,delete
,move
,status
,cancel
,schedule
). If the connection options are not given, the tool tries to connect to a local node with default parameters. -
<output parameters>
– the parameters that specify the output format and output file.
Parameters
Connection Parameters
Connection parameters allow you to specify the node on which commands will be executed. The following command require connection parameters: list
, info
, snapshot
, restore
, check
, delete
, move
, status
, cancel
, schedule
.
Parameter | Description | Default |
---|---|---|
|
The IP address or the host name of the node where the command will be executed. The tool connects to this node in order to issue snapshot related requests. |
|
|
The port on the cluster’s node the snapshot tool will connect to. The port number is defined by org.apache.ignite.configuration.ConnectorConfiguration and defaults to 11211. |
|
|
The time interval between heartbeats that are sent from the tool to the cluster’s node, in milliseconds. |
|
|
Node response timeout. |
|
|
The user name for connecting to a cluster that requires authentication. |
- |
|
The password for connecting to a cluster that requires authentication. |
- |
Output Parameters
All commands support the following output parameters.
Parameter | Description | Default |
---|---|---|
|
The file to which the tool will save the output or error code. |
snapshot-utility.out |
|
The output format: text or JSON. |
text |
Exit Codes
The snapshot tool returns a code as a result of an operation performed on the cluster. These codes are listed below:
Exit Code | Description |
---|---|
0 |
Successful execution. |
1 |
Unexpected error. |
2 |
Unknown command. |
3 |
Invalid arguments. |
4 |
Connection failed. |
5 |
Command failed with known error code. |
6 |
Command executed successfully, but the tool failed to write the result to the output file. |
7 |
Command failed and the tool failed to write error code to the output file. |
HELP
The command prints out the list of all commands supported by the tool.
snapshot-utility.sh help
snapshot-utility.bat help
To get more details about a specific command, pass the command name as an argument to the help
command.
snapshot-utility.sh help snapshot
snapshot-utility.bat help snapshot
LIST
This command lists all locally stored snapshots.
snapshot-utility.sh list [-src=path1,...,pathN] [-verbose] <connection parameters> <output parameters>
snapshot-utility.bat list [-src=path1[,path2,...,pathN]] [-verbose] <common parameters>
This command supports connection parameters and output parameters.
Command Arguments
Arguments | Description |
---|---|
-src=path1[,path2,…,pathN] |
A list of folders to search for snapshot files. |
-verbose |
The output will additionally contain the names of the caches included in the snapshot. |
Error Codes
Code | Description | Solution |
---|---|---|
2000 |
Failed to execute the |
This error means that something unexpected happened. Check cluster logs for errors. |
2110 |
Unknown or unsupported arguments. |
Check if the arguments are correct. |
2120 |
Invalid argument value. |
Check if the argument values are correct. |
2130 |
Snapshot tool version incompatible. |
Check if the snapshot tool and the cluster have the same version. |
2200 |
Snapshots tool failed to authenticate in the cluster. |
Make sure that the username and password are correct. |
2210 |
Snapshots tool failed to authorize in the cluster. |
Make sure that the username and password are correct. |
2300 |
Snapshots tool failed to connect to the cluster. |
Check the following:
|
2400 |
Snapshots are not configured. The command can’t be executed. |
Refer to Enabling Snapshots for more details. |
2410 |
Cluster is not active, the command cannot be executed. |
Activate the cluster. |
2800 |
Command executed successfully, but the snapshot tool failed to write result to the output file. |
Check the output file name and permissions. |
2810 |
Command failed and the snapshot tool failed to write error code to the output file. |
Check the output file name and permissions. |
INFO
This command prints detailed information about a specific snapshot.
snapshot-utility.sh info -id=SNAPSHOT_ID <connection parameters> <output parameters>
snapshot-utility.bat info -id=[snapshot_id] <common parameters>
This command supports connection parameters and output parameters.
Command Arguments
Arguments | Description |
---|---|
-id=SNAPSHOT_ID |
The ID of the snapshot. Use the list command to obtain snapshot IDs and other details. |
-src=path1,…,pathN |
A list of folders to search for snapshot files. The tool will search for snapshots in the default snapshot folder and the folders given in this argument. |
Error Codes
Code | Description | Solution |
---|---|---|
3000 |
Failed to execute the |
This error means that something unexpected happened. Check cluster logs for errors. |
3110 |
Unknown or unsupported arguments. |
Check that the arguments are correct. |
3120 |
An invalid argument value. |
Check that the arguments values are correct. |
3130 |
Snapshot tool version incompatible. |
Check if the snapshot tool and the cluster have the same version. |
3200 |
Snapshots tool failed to authenticate in the cluster. |
Check that the username and password are correct. |
3210 |
Snapshots tool failed to authorize in the cluster. |
Check that the username and password are correct. |
3300 |
Snapshots tool failed to connect to the cluster. |
Check the following: * the node defined by * the port number defined by * check the cluster logs for further information. |
3400 |
Snapshots are not configured. The command can’t be executed. |
Refer to Enabling Snapshots for more details. |
3410 |
Cluster is not active, the command cannot be executed. |
Activate the cluster. |
3500 |
A snapshot with the specified ID does not exist. |
Check that the snapshot ID is correct. Use the |
3800 |
Command executed successfully, but the snapshot tool failed to write result to the output file. |
Check the output file name and permissions. |
3810 |
Command failed and the snapshot tool failed to write error code to the output file. |
Check the output file name and permissions. |
SNAPSHOT
The command creates a snapshot of the cluster’s data. You can specify a list of caches you want to include in the snapshots.
snapshot-utility.sh snapshot [-type=full|inc] [-caches=cache1,cache2…] [-dest=EXTERNAL_FOLDER] [-verbose] [-comment=text] <connection parameters> <output parameters>
snapshot-utility.bat snapshot [-type=full|inc] [-caches=cache1,cache2…] [-dest=EXTERNAL_FOLDER] [-verbose] [-comment=text] <common arguments>
After successful execution, the command will output the snapshot details to console and the file specified by the -output
argument.
This command supports connection parameters and output parameters.
Command Arguments
Arguments | Description |
---|---|
-type=full|inc |
The type of snapshot: full or incremental. If this argument is not specified, an incremental snapshot is created. |
-caches={cache1,…,cacheN} |
Include specific caches in the snapshots. If this argument is specified, only the given caches are included in the snapshot. If the argument is not specified, the snapshot will include all caches. If a cache is included in a cache group, then the entire cache group will be included in the snapshot. When Point-in-Time Recovery is enabled, the command will return 4000 error code when executed with this parameter. With PITR, you can only create snapshot with all the caches stored in the cluster. |
-dest=EXTERNAL_FOLDER |
The folder where the snapshot will be saved. If not specified, the default snapshot folder will be used. |
-verbose |
The output will additionally contain the names of the caches included in the snapshot. |
-comment=TEXT |
Add a custom message to the history record of this operation. The history is available via the catalog command. |
-needexchange |
If this parameter is specified, the cluster waits for all ongoing cache updates to mark all data to be included in the snapshot and this step requires partition map exchnage (PME). For detailed information about PME, see Data Partitioning. By default, this flag is not specified and creating a snapshot does not require PME. When point-in-time recovery is enabled, the PME is still required to create snapshots, even though this parameter is not specified. |
Error Codes
Code | Description | Solution |
---|---|---|
4000 |
Failed to execute the |
This error means that something unexpected happened. Check cluster logs for errors. |
4110 |
Unknown or unsupported arguments. |
Check that the arguments are correct. |
4120 |
Invalid argument. |
Check that the arguments values are correct. |
4130 |
Snapshot tool version incompatible. |
Check that snapshot tool is the same version as cluster. |
4200 |
Failed to authenticate in the cluster. |
Check that the username and password are correct. |
4210 |
Failed to authorize in the cluster. |
Check that the username and password are correct. |
4300 |
Failed to connect to the cluster. |
Check the following:
|
4400 |
Snapshots are not configured. The command can’t be executed. |
Refer to Enabling Snapshots for more details. |
4410 |
Cluster is not active, the command cannot be executed. |
Activate the cluster. |
4520 |
An attempt to start snapshot creation while the previous snapshot creation operation is still in progress. |
Wait for the previous snapshot to finish. Use the |
4530 |
Cannot create an incremental snapshot because the last full snapshot was not found. |
Create a full snapshot first. |
4600 |
Failed to find a cache with the specified name. |
Check that the caches specified in the |
4710 |
Failed to create a snapshot in the destination folder. |
Check if the destination folder has proper permissions. |
4800 |
Command executed successfully, but the snapshot tool failed to write result to the output file. |
Check the output file name and permissions. |
4810 |
Command failed and the snapshot tool failed to write error code to the output file. |
Check the output file name and permissions. The history is available via the |
RESTORE
The command restores the cluster data to the state preserved in a specific snapshot or to a given past point in time (if Point-in-Time Recovery is enabled).
To restore a specific snapshot:
snapshot-utility.sh restore -id=snapshot_id [-nocheck] [-src=path1,...,pathN] [-config=config.xml] [-force] [-comment=text] <connection parameters> <output parameters>
snapshot-utility.bat restore -id=snapshot_id [-caches=cache1,cache2…] [-nocheck] [-src=path1[,path2,...,pathN]] [-config=config.xml] [-force] [-comment=text] <common arguments>
To restore to a point in time:
snapshot-utility.sh restore -to=yyyy-MM-dd-HH:mm:ss.SSS [-caches=cache1,cache2,...] [-nocheck] [-comment=text] <connection parameters> <output parameters>
This command supports connection parameters and output parameters.
Command Arguments
Arguments | Description |
---|---|
-id=SNAPSHOT_ID |
The ID of the snapshot to be restored. Use the |
-to=yyyy-MM-dd-HH:mm:ss.SSS |
The time you want to recover to. For this argument to work, point-in-time recovery must be enabled. See Point-in-Time Recovery for details. |
-caches=[cache1,…,cacheN] |
The list of caches to be restored from the snapshot. The data of the specified caches in the running cluster will be replaced with the content from the snapshot. If this argument is not specified, all caches will be restored. If a cache is included in a cache group, the entire group will be restored. This argument has no effect when recovering to a point of time. When using PITR, all caches will be restored. |
-nocheck |
Disables snapshot verification. If the argument is not specified, the snapshot will be checked for consistency before being restored (default behavior). |
-src=path1,…,pathN |
A list of folders to look for snapshot files. If the argument is not specified, the default snapshot folder is used. |
-config=config.xml |
The file with cache configurations that will be used instead of the configuration stored in the snapshot metadata. |
-force |
If you add new caches to the cache group after a snapshot was created, the tool will return an error when restoring that group. Specify this option to replace the entire group, deleting the new caches from the cluster. |
-comment=TEXT |
Add a custom message to the history record of this operation. The history is available via the catalog command. |
Error Codes
Code | Description | Solution |
---|---|---|
5000 |
Failed to execute the |
This error means that something unexpected happened. Check cluster logs for errors. |
5110 |
Unknown or unsupported arguments. |
Check that the arguments are correct. |
5120 |
An invalid argument. |
Check that the arguments values are correct. |
5130 |
Snapshot tool version incompatible with the cluster. |
Check if the snapshot tool and the cluster have the same version. |
5200 |
Failed to authenticate in the cluster. |
Check that the username and password are correct. |
5210 |
Failed to authorize in the cluster. |
Check that the username and password are correct. |
5300 |
Failed to connect to the cluster. |
Check the following:
|
5400 |
Snapshots are not configured. The command can’t be executed. |
Refer to Enabling Snapshots for more details. |
5410 |
Cluster is not active, the command cannot be executed. |
Activate the cluster. |
5500 |
A snapshot with the specified ID doesn’t exist. |
Check that the snapshot ID is correct. Use the |
5510 |
The snapshot is corrupt. |
Replace corrupt snapshot files with correct ones. |
5600 |
Failed to find a cache with the specified name. |
Check if -caches argument is specified correctly. |
5610 |
Failed to read the cache configuration file. |
Check if the file has correct permissions. |
5700 |
The number of caches in the cache groups to be restored has changed, i.e. you have added new caches to the cache groups after the snapshot was taken. |
Use the |
5800 |
Command executed successfully, but the snapshot tool failed to write result to output file. |
Check the output file name and permissions. |
5810 |
Command failed and the snapshot tool failed to write error code to output file. |
Check the output file name and permissions. |
CHECK
This command checks if the specified snapshot is not broken and can be restored on this cluster.
snapshot-utility.sh check -id=[snapshot_id] [-src=path1,...,pathN] [-caches=cache1,cache2,...] [-force] <connection parameters> <output parameters>
This command supports connection parameters and output parameters.
Command Arguments
Arguments | Description |
---|---|
-id=SNAPSHOT_ID |
The ID of the snapshot to be checked. Use the list command to obtain snapshot IDs and other details. |
-src=path1,…,pathN |
A list of folders to search for snapshot files. |
-caches=[cache1,…,cacheN] |
A list of caches to be checked. |
-force |
For each cache specified in the |
Error Codes
Code | Description | Solution |
---|---|---|
6000 |
Failed to execute the |
This error means that something unexpected happened. Check cluster logs for errors. |
6110 |
Unknown or unsupported arguments. |
Check that the arguments are correct. |
6120 |
Invalid argument. |
Check that the arguments values are correct. |
6130 |
Snapshot tool version incompatible with the cluster. |
Check if the snapshot tool and the cluster have the same version. |
6200 |
Failed to authenticate in the cluster. |
Check that the username and password are correct. |
6210 |
Failed to authorize in the cluster. |
Check that the username and password are correct. |
6300 |
Failed to connect to the cluster. |
Check the following:
|
6400 |
Snapshots are not configured. The command can’t be executed. |
Refer to Enabling Snapshots for more details. |
6410 |
Cluster is not active, command cannot be executed. |
Activate the cluster. |
6500 |
The snapshot with the specified ID doesn’t exist. |
Check that the snapshot ID is correct. Use the |
6510 |
The snapshot is corrupt. |
Check log files for errors. Check if you have had any hardware problems. Restore broken or missing files from a backup copy. |
6600 |
The cache with the specified name is not found. |
Check value of |
6700 |
The number of caches in the cache groups to be restored has changed, i.e. you have added new caches to the cache groups after the snapshot was taken. |
Use the |
6800 |
Command executed successfully, but snapshot tool failed to write result to output file. |
Check output file name and permissions. |
6810 |
Command failed and snapshot tool failed to write error code to output file. |
Check output file name and permissions. |
DELETE
This command deletes a snapshot.
snapshot-utility.sh delete -id=snapshot_id [-force] [-comment=text] <connection parameters> <output parameters>
snapshot-utility.bat delete -id=snapshot_id [-force] [-comment=text] <common arguments>
This command supports connection parameters and output parameters.
Command Arguments
Arguments | Description |
---|---|
-id=SNAPSHOT_ID |
The ID of the snapshot to be deleted. Use the |
-force |
If this option is not specified and if there are dependent snapshots for the given snapshot, the tool will return an error. A dependent snapshot is a snapshot that requires the given snapshots for successful restoration. For example, an incremental snapshot depends on the last full snapshot and all incremental snapshots taken in-between. Use this option to delete the specified snapshot and all dependent snapshots. |
-comment=TEXT |
Add a custom message to the history record of this operation. The history is available via the |
Error Codes
Code | Description | Solution |
---|---|---|
7000 |
Failed to execute the |
Check cluster logs for errors. This error means that something unexpected happened. |
7110 |
Unknown or unsupported arguments. |
Check that the arguments are correct. |
7120 |
Invalid argument. |
Check that the arguments values are correct. |
7130 |
Snapshot tool version incompatible with the cluster. |
Check if the snapshot tool and the cluster have the same version. |
7200 |
Failed to authenticate in the cluster. |
Check that username and password are correct. |
7210 |
Failed to authorize in the cluster. |
Check that the username and password are correct. |
7300 |
Failed to connect to the cluster. |
Check the following:
|
7400 |
Snapshots are not configured. The command can’t be executed. |
Refer to Enabling Snapshots for more details. |
7410 |
Cluster is not active, the command cannot be executed. |
Activate the cluster. |
7500 |
The snapshot with the specified ID doesn’t exist. |
Check that the snapshot ID is correct. Use the |
7700 |
Failed to delete the specified snapshot because there are dependent snapshots. See the description of the |
Use the |
7720 |
Failed to delete the specified snapshot because the file operations were denied. |
Check if the snapshot files exist and have correct permissions. |
7800 |
Command executed successfully, but the snapshot tool failed to write result to the output file. |
Check the output file name and permissions. |
7810 |
Command failed and the snapshot tool failed to write error code to the output file. |
Check the output file name and permissions. |
MOVE
This command moves a specific snapshot and all related files from the default folder to a specified folder. The default snapshot folder is IGNITE_HOME\work\snapshot
and can be changed in the snapshot configuration. See Full and Incremental Snapshots for details.
If you create a snapshot using the snapshot management tool with the -dest
argument specified, you won’t be able to move the snapshot using the tool. However, you can move it manually by moving the snapshot files on the file system.
snapshot-utility.sh move -id=snapshot_id -dest=EXTERNAL_FOLDER [-force] [-comment=text] <connection parameters> <output parameters>
This command supports connection parameters and output parameters.
Command Arguments
Arguments | Description |
---|---|
-id=SNAPSHOT_ID |
The ID of the snapshot to move. Use the |
-dest=EXTERNAL_FOLDER |
The name of the folder where the snapshot will be moved. |
-force |
If this option is not specified and for the given snapshot there are dependent snapshots, the tool will return an error. A dependent snapshot is a snapshot that requires the given snapshots for successful restoration. For example, an incremental snapshot depends on the last full snapshot and all incremental snapshots taken in-between. Use this option to move the specified snapshot and all dependent snapshots. |
-comment=COMMENT |
Add a custom message to the history record of this operation. The history is available via the |
Error Codes
Code | Description | Solution |
---|---|---|
8000 |
Failed to execute the |
This error means that something unexpected happened. Check cluster logs for errors. |
8110 |
Unknown or unsupported arguments. |
Check that the arguments are correct. |
8120 |
An invalid argument value. |
Check that the argument values are correct. |
8130 |
Snapshot tool version incompatible with the cluster. |
Check if the snapshot tool and the cluster have the same version. |
8200 |
Failed to authenticate in the cluster. |
Check that the username and password are correct. |
8210 |
Failed to authorize in the cluster. |
Check that the username and password are correct. |
8300 |
Failed to connect to the cluster. |
Check the following: * the node defined by the * the port number defined by the * check GridGain cluster logs for further information. |
8400 |
Snapshots are not configured. The command can’t be executed. |
Refer to Enabling Snapshots for more details. |
8410 |
Cluster is not active, command cannot be executed. |
Activate the cluster. |
8500 |
The snapshot with the specified ID doesn’t exist. |
Check that the snapshot ID is correct. Use the |
8700 |
Failed to move the specified snapshot because there are dependent snapshots. See the description of the |
Use the |
8710 |
Failed to move snapshot to the destination folder. |
Check if the destination folder has correct permissions. |
8720 |
Failed to delete the specified snapshot. File operations are denied. |
Check if the snapshot files have correct permissions. |
8800 |
Command executed successfully, but the snapshot tool failed to write result to the output file. |
Check the output file name and permissions. |
8810 |
Command failed and the snapshot tool failed to write error code to the output file. |
Check the output file name and permissions. |
STATUS
This command will print a list of the currently running snapshot operations, such as snapshot
, restore
, delete
, or move
.
snapshot-utility.sh status <connection parameters> <output parameters>
This command supports connection parameters and output parameters.
Error Codes
Code | Description | Solution |
---|---|---|
9000 |
Failed to execute the |
This error means that something unexpected happened. Check cluster logs for errors. |
9110 |
Unknown or unsupported arguments. |
Check that the arguments are correct. |
9120 |
An invalid argument value. |
Check that the arguments values are correct. |
9130 |
Snapshot tool version incompatible with the cluster. |
Check if the snapshot tool and the cluster have the same version. |
9200 |
Failed to authenticate in the cluster. |
Check that the username and password are correct. |
9210 |
Failed to authorize in the cluster. |
Check that the username and password are correct. |
9300 |
Failed to connect to the cluster. |
Check the following: * the node defined by the * the port number defined by the * check the cluster logs for further information. |
9400 |
Snapshots are not configured. The command can’t be executed. |
Refer to Enabling Snapshots for more details. |
9410 |
Cluster is not active, the command cannot be executed. |
Activate the cluster. |
9800 |
Command executed successfully, but the snapshot tool failed to write result to the output file. |
Check the output file name and permissions. |
9810 |
Command failed and the snapshot tool failed to write error code to the output file. |
Check the output file name and permissions. |
CATALOG
This command will print information about snapshots listed in the snapshots catalog.
What is Snapshots Catalog?
Snapshots catalog is a standalone service where clusters store the history of snapshot-related operations. When a user executes a command (such as ‘snapshot’, ‘copy’, ‘move', or ‘restore'), the cluster connects to the snapshot catalog which in turn uses the web console backend to save this command in the history. Snapshot catalog can store history for as many clusters as you want.
To use snapshot catalog service, you will need to:
-
set up the Ignite Web Console backend.
-
provide the following configuration in your cluster configuration file.
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
<!-- Enabling the snapshots. -->
<property name="pluginConfigurations">
<bean class="org.gridgain.grid.configuration.GridGainConfiguration">
<property name="snapshotConfiguration">
<bean class="org.gridgain.grid.configuration.SnapshotConfiguration">
<property name="snapshotsCatalogConnectorConfiguration">
<bean class="org.gridgain.grid.configuration.SnapshotsCatalogConnectorConfiguration">
<property name="serverUri" value="http://path-to-webconsole-backend"/> <!-- Provide path to Web Console’s backend -->
<property name="port" value="80"/> <!-- Provide port of Web Console’s backend -->
</bean>
</property>
</bean>
</property>
</bean>
</property>
</bean>
The catalog
command requests information directly from the catalog and does not require connection to the cluster. Below are some examples.
Output the list of clusters registered in the catalog:
snapshot-utility.sh catalog [-host=http://localhost] [-port=80] <output parameters>
List snapshots for a specific cluster:
snapshot-utility.sh catalog -cluster=CLUSTER_NAME [-from=yyyy-MM-dd-HH:mm:ss.SSS] [-to=yyyy-MM-dd-HH:mm:ss.SSS] [-last=PERIOD] [-verbose] [-host=http://localhost] [-port=80] <output parameters>
List snapshot operation history for a specific cluster:
snapshot-utility.sh catalog -cluster=CLUSTER_NAME -history [-from=yyyy-MM-dd-HH:mm:ss.SSS] [-to=yyyy-MM-dd-HH:mm:ss.SSS] [-last=PERIOD] [-verbose] [-host=http://localhost] [-port=80] <output parameters>
This command supports output parameters.
Command Arguments
Arguments | Description |
---|---|
-cluster=CLUSTER_ID |
Output the list of snapshots of the specified cluster. |
-history |
Print out the history of snapshot operations for the specified cluster. This argument requires the |
-from=yyyy-MM-dd-HH:mm:ss.SSS |
Specify the beginning of a time period. The command will print operations that were executed during this period.
The format is |
-to=yyyy-MM-dd-HH:mm:ss.SSS |
Specify the end of a time period. The command will print operations that were executed during this period.
The format is |
-last=PERIOD |
Show history for the specified period. If this argument is not specified, history for the last hour will be printed out. PERIOD could be one of the following:
|
-verbose |
Enable verbose mode, which shows all caches in the snapshot. |
-host=HOST |
Snapshots catalog URI. The default value is "localhost" |
-port=PORT |
Snapshots catalog connection port. The default port is 80. |
Error Codes
Code | Description | Solution |
---|---|---|
10000 |
Unexpected error. |
This error means that something unexpected happened. Check cluster logs for errors. |
10110 |
Unknown or unsupported arguments. |
Check that the arguments are correct. |
10120 |
Invalid argument value. |
Check that the argument values are correct. |
10130 |
Snapshot tool version incompatible with the cluster. |
Check if the snapshot tool and the cluster have the same version. |
10900 |
Failed to receive data from the snapshots catalog. |
Check that the tool can connect to snapshots catalog via REST HTTP. |
CANCEL
This command cancels a specified ongoing operation.
snapshot-utility.sh cancel -id=operationId [-force] [-comment=text] <connection parameters> <output parameters>
This command supports connection parameters and output parameters.
Command Arguments
Arguments | Description |
---|---|
-id=OPERATION_ID |
The ID of the operation to be cancelled. |
-force |
Some operations cannot be cancelled during execution, for example, because of an ongoing file system operation. In such cases, if this argument is not specified, the command will return an error. If the argument is specified, the command will forcibly interrupt any operations, possibly leaving behind inconsistent or corrupt files. |
-comment=TEXT |
Add a custom message to the history record of this operation. The history is available via the |
Error Codes
Code | Description | Solution |
---|---|---|
11000 |
Failed to execute the |
This error means that something unexpected happened. Check cluster logs for errors. |
11110 |
Unknown or unsupported arguments. |
Check that the arguments are correct. |
11120 |
Invalid argument value. |
Check that the arguments values are correct. |
11130 |
Snapshot tool version incompatible with the cluster. |
Check if the snapshot tool and the cluster have the same version. |
11200 |
Failed to authenticate in the cluster. |
Check that the username and password are correct. |
11210 |
Failed to authorize in the cluster. |
Check that the username and password are correct. |
11300 |
Failed to connect to the cluster. |
Check the following: * the node defined by the -host and -port arguments is reachable. * the port number defined by the -port argument is not blocked by firewalls. * check GridGain cluster logs for further information. |
11400 |
The persistent store is not configured. The command can’t be executed. |
Refer to Enabling Snapshots for more details. |
11410 |
Cluster is not active, the command cannot be executed. |
Activate the cluster. |
11800 |
Command executed successfully, but the snapshot tool failed to write result to the output file. |
Check the output file name and permissions. |
11810 |
Command failed and the snapshot tool failed to write error code to the output file. |
Check the output file name and permissions. |
SCHEDULE
This command allows you to create schedules of snapshot operations. Each schedule has a name and can be enabled or disabled as necessary.
For this command to work, the Ignite-schedule module must be installed on the node where the command is to be executed.
List all registered schedules:
snapshot-utility.sh schedule -list [-verbose] <connection parameters> <output parameters>
Create a snapshot creation schedule:
snapshot-utility.sh schedule -command=create -name=CREATE_SCHEDULE_NAME [-caches=cache1,cache2,…] -full_frequency=FREQUENCY [-incremental_frequency=FREQUENCY] <connection parameters> <output parameters>
Create a snapshot deletion schedule:
snapshot-utility.sh schedule -command=delete -name=SCHEDULE_NAME [-ttl=TTL] [-frequency=hourly] <connection parameters> <output parameters>
snapshot-utility.sh schedule -command=delete -name=SCHEDULE_NAME [-for-oldest=NUMBER_OF_SNAPSHOTS] [-frequency=hourly] <connection parameters> <output parameters>
Create a schedule for the move
operation:
snapshot-utility.sh schedule -command=move -name=MOVE_SCHEDULE_NAME -dest=DEST_FOLDER [-ttl=TTL] [-frequency=hourly] <connection parameters> <output parameters>
Create a schedule for the check
operation:
snapshot-utility.sh schedule -command=check -name=CHECK_SCHEDULE_NAME [-for-latest=NUMBER_OF_SNAPSHOTS] [-frequency=hourly] <connection parameters> <output parameters>
Enable a schedule:
snapshot-utility.sh schedule -name=SCHEDULE_NAME -enable <connection parameters> <output parameters>
Disable a schedule:
snapshot-utility.sh schedule -name=SCHEDULE_NAME -disable <connection parameters> <output parameters>
Delete a schedule:
snapshot-utility.sh schedule -name=SCHEDULE_NAME -delete <connection parameters> <output parameters>
This command supports connection parameters and output parameters.
Command Arguments
Arguments | Description |
---|---|
-list |
Show all registered schedules. |
-verbose |
Enable verbose mode. |
-name=SCHEDULE_NAME |
Specify a schedule name. |
-command=COMMAND |
Specify the command to be scheduled ("create", "delete", or "move").
|
-caches=cache1,…,cacheN |
Specify the names of the caches to be included in the snapshot. |
-full_frequency=FREQUENCY |
Set a full snapshot creation frequency. |
-incremental_frequency=FREQUENCY |
Set an incremental snapshot creation frequency. |
-frequency=FREQUENCY |
Set the frequency for the delete or move command. The default frequency is every hour. |
-ttl=TTL |
The time period for the maintenance of snapshots before they could be moved or deleted. Only one of parameters |
-for-oldest=NUMBER_OF_SNAPSHOTS |
Select NUMBER_OF_SNAPSHOTS oldest snapshots to check, move or delete. Only one of parameters |
-for-latest=NUMBER_OF_SNAPSHOTS |
Select NUMBER_OF_SNAPSHOTS latest snapshots to check, move or delete. Only one of parameters |
-dest=DESTINATION_FOLDER |
The snapshot destination folder. |
-enable |
Enable a schedule. |
-disable |
Disable a schedule. |
-delete |
Delete a schedule. |
Where FREQUENCY could be one of the following:
-
"15mins" - execute every 15 minutes
-
"30mins" - execute every 30 minutes
-
"hourly" - execute every hour
-
"daily" - execute every day at 00:00
-
"weekly" - execute every Sunday at 00:00
-
any valid CRON expression, for example:
0 0 * * *
Where TTL could be one of the following:
-
NNd - NN days, for example: 3d
-
NNh - NN hours, for example: 12h
-
NNm - NN minutes, for example: 90m
-
NN - NN milliseconds, for example: 100000
Error Codes
Code | Description | Solution |
---|---|---|
12000 |
Failed to execute the |
This error means that something unexpected happened. Check cluster logs for errors. |
12110 |
Unknown or unsupported arguments. |
Check that the arguments are correct. |
12120 |
Invalid argument value. |
Check that the arguments values are correct. |
12130 |
Snapshot tool version incompatible with the cluster. |
Check if the snapshot tool and the cluster have the same version. |
12200 |
Failed to authenticate in the cluster. |
Check that the username and password are correct. |
12210 |
Failed to authorize in the cluster. |
Check that the username and password are correct. |
12300 |
Failed to connect to the cluster. |
Check the following:
|
12400 |
The persistent store is not configured. The command can’t be executed. |
Refer to Enabling Snapshots for more details. |
12410 |
Cluster is not active, the command cannot be executed. |
Activate the cluster. |
12420 |
Could not find the |
Copy the |
12430 |
Schedule with the specified name not found. |
Check if the specified schedule name is correct. |
12440 |
Schedule with the specified name already exists. |
Enter another name. |
12800 |
Command executed successfully, but snapshot tool failed to write result to output file. |
Check the output file name and permissions. |
12810 |
Command failed and snapshot tool failed to write error code to output file. |
Check the output file name and permissions. |
© 2021 GridGain Systems, Inc. All Rights Reserved. Privacy Policy | Legal Notices. GridGain® is a registered trademark of GridGain Systems, Inc.
Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks or trademarks of The Apache Software Foundation.