Recovery with Persistence

You can set up recovery with persistence by:

  • Using the API Operations
  • Using the Admin CLI

Setting up Recovery Using the API Operations

The C API provides the following recover API settings, which are specified using the metaspace object, space name, and recovery options and passing a struct:

struct _tibasRecoveryOptions {
    tibas_recoveryPolicy recoveryPolicy;
    tibas_boolean keepFiles;
    tibas_int quorumSize;
    tibas_int threadCount;
};
The enum values for tibas_recoveryPolicy is as follows:
typedef enum _tibas_recoveryPolicy {
    TIBAS_RECOVERY_NO_DATA              = 0,
    TIBAS_RECOVERY_DATA_LOSS            = 1,
    TIBAS_RECOVERY_NO_DATA_LOSS         = 2,  //Default
    TIBAS_RECOVERY_EXACT_CLUSTER        = 3,
    TIBAS_RECOVERY_FAST_LOAD_ONLY       = 3,
    TIBAS_RECOVERY_ROBUST_LOAD_ONLY     = 4,
    TIBAS_RECOVERY_FORCE_LOAD           = 5
} tibas_recoveryPolicy;
To recover a space use the recover space command in the as-admin utility. For example, as-admin recover space 'myspace' recovery_policy 'no_data_loss'. For more information, refer to the recover space command in the TIBCO ActiveSpaces Administration guide.

The default value for recoverWithData (TIBAS_TRUE) specifies recovery with data; if you specify TIBAS_FALSE, recovery without data is set.

You can also use tibasMetaspace_RecoverSpaceEx(metaspace, spaceName, recoveryOptions).

The Java and .NET APIs provide similar APIs.

Setting up Recovery Using the CLI

To set up recovery using the Admin CLI:

Connect to the metaspace and enter recovery commands as shown in the following example:

as-admin> recover space 'myspace' recovery_policy 'no_data_loss'