recover space

The recover space command is used when all of the members of a metaspace have stopped and you are restarting those members. The recover space command allows you to control how persisted data for an individual space is restored.

Syntax

Note: The options with data and without data with recovery_policy, are mutually exclusive. You can only use one of them in the command.
recover space <string>
    [recovery_policy <string> | with data | without data]
    [quorum <integer>]
    [keep_files <boolean>]
Note: The options with data and without data with recovery_policy, are mutually exclusive. You can only use one of them in the command.

Parameters

The following table lists the parameters for this command with a description of each parameter.

recover space Parameters
Parameter Description
space The name of the space to recover.
recovery_policy
Optional. A string containing one of the following:
  • no_data - Does not recover data with the space.
    Attention: When you recover a space without data, the persistence files are not deleted from the datastore. This is true even when you set keep_files to be false. For example, when you issue the command recover space "<space_name>" no data keep_files false, the persistence files are not deleted from the datastore.
  • no_data_loss - (default.) Start data recovery when there are enough seeders to ensure data loss does not occur.
  • data_loss - Start data recovery immediately even if there is a chance of a data loss.
  • fast_load_only - Start data recovery once all seeders are ready.
  • robust_load_only - Start data recovery when there are enough seeders to ensure data loss will not occur. This option will ensure fast load is not attempted.
  • force_load - Start data recovery immediately even if data loss will occur. Ignores all checks for required hosts/seeders and fast load is not attempted.
data Optional/Deprecated. Specifies whether the data from the space should be restored with the space. Specifying with indicates that the data from the space, which has been persisted to disk, should be restored with the space. Specifying without indicates the space should be restored without its data.
Attention: The options with data and without data are now deprecated. Use no_data_loss and no_data instead respectively.
quorum Optional. An integer that specifies the minimum number of seeders which are needed for recovery to start. The default is 1.
keep_files Optional. A boolean value that indicates whether the persistence files should be saved or deleted after recovery is complete. The default is false.

If you do not specify the parameter when you issue the recover space command, all old files, and also any shared nothing persistence files that have the file extension .INVALID are deleted. However, any file that is not in ActiveSpaces name format is not removed.

If you specify true for the keep_files parameter, all files are retained when the space is recovered.

Note: When recovering a space which has a capacity defined, by default only the keys and indexes of the space are restored to memory regardless of whether or not the capacity has been reached. When capacity has been defined for a space, you can force the recovery of all data for a space, up to the capacity, by using the robust_load_only recovery policy. For any other recovery policy setting, the default behavior of only loading keys and indexes to memory is enforced.

Example

recover space ’myspace’ no_data_loss
Note: String values passed as parameters must be enclosed in either single or double quotes.