The start_ar API function lets you perform an assured recovery operation (AR) for a scenario. When you perform an automatic AR, you do not need to call other APIs to stop the AR. The AR will stop after the AR operation completes. When you perform a manual AR, call the API resume_application to stop the AR operation.
Arguments
The start_ar API function includes the arguments described in the following table:
Name |
Type |
Description |
---|---|---|
session_id |
uint |
The session ID that was returned by calling the create_session API. |
scenario_id |
uint |
The scenario ID for which you want to perform assured recovery. |
replica_index |
uint |
The replica host index in a scenario. Typically, the value of the replica index is 2. This is the host for which replication will be suspended. |
auto_ar |
bool |
Run AR automatically or manually.
|
execute_sync |
bool |
Regulates whether to call this API synchronously or asynchronously. |
message |
out string |
Contains the reason for failure when this API fails. |
Return Values
The return type is Boolean. When the return value is true, the API completed successfully. When the return value is false, the API did not complete successfully. If the return value is false, review the message to determine the reason the API failed.
Example
public bool start_ar_example() { try { uint scenario_id = _scenario_id; string message = ""; bool execute_sync = true; uint replica_index = 2; bool auto_ar = true; return get_mng().start_ar(_session_id, scenario_id, replica_index, auto_ar, execute_sync, out message); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } return false; }
Copyright © 2015 Arcserve.
All rights reserved.
|
|