The run API function lets you run scenarios. As a best practice, call the add_credentials_ex API to authenticate the Master host before you call the run API.
Arguments
The run 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 function API. |
|
scenario_id |
uint |
The scenario ID to be started. |
|
sync_method |
uint |
The synchronization method, which can be one of the following options: 0 - File synchronization 1 - Block synchronization 2 - Volume synchronization (for only FullSystem scenario.) |
|
ignore_same_files |
bool |
Ignore the same size/time files. |
|
arc_upt |
bool |
This parameter applies to only Arcserve Backup integrated scenarios. When the scenario is not a Arcserve Backup integrated parameter, you should set this parameter to false. When the scenario is integrated with Arcserve Backup, call the add_bab_credentials API before you call the run API. |
|
verification_and_run |
uint |
Reserved. Must always be defined as 1. |
|
message |
out string |
Contains a detailed description of the error when this API fails. |
Return Values
This function returns a value of true when the scenario starts successfully. Otherwise, this function returns a value of false and provides a detailed description of the error in the message argument.
Example
public bool run_example()
{
try
{
uint scenario_id = _scenario_id;
//0:File Sync;1:Block Sync;2:Volume Sync
uint sync_method = 0;
bool ignore_same_files = true;
bool arc_integrated = false;
string message = "";
return get_mng().run(_session_id, scenario_id, sync_method, ignore_same_files, arc_integrated, 1, out message);
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
}
return false;
}
|
Copyright © 2015 Arcserve.
All rights reserved.
|
|