Disaster Recovery Executable File
A Disaster Recovery executable file has been developed for Administrators who want to configure and edit their disaster recovery settings by using a scripting language.
The Disaster Recovery executable file is named drconfig.exe and is located in the following folder.
…./Program Files (x86)/Upland AccuRoute/AccuRoute/Bin
The executable file allows Administrators to perform the following tasks at the Command line without the use of the Server Administrator.
Before you begin
The drconfig.exe file can be used to print component names, set primary and backup site values, retrieve configuration details or initiate cutover only after Disaster Recovery is configured in the Server Administrator.
Administrators must complete the following tasks.
-
Set up Disaster Recovery using the Server Administrator.
-
If Disaster Recovery is currently set up via the Server Administrator, open the Disaster Recovery settings in the Server Administrator and select OK to save the settings without making any changes. This ensures that each Disaster Recovery component is given a unique name which is required for scripting.
See the Server Administrator > Disaster Recovery Settings dialog box example below.
Accessing the Disaster Recovery executable file
Any application created to call the drconfig.exe file must be able to find and run it from the Bin folder on the server. You cannot copy the executable file to a different folder. It will not work properly.
Use drconfig.exe -status at the Command line to get the status on which site is running, Primary or Backup. The following Return codes are captured during this process.
1 - Success Primary is active.
2 - Success Backup is active.
Use drconfig.exe -components at the Command line to get a list of the Disaster Recovery components. You can copy the component names to a txt file by using drconfig.exe -components > *.txt. You must specify a filename in place of the asterisk.
You will need to know the names of the components when setting values during scripting. Some component names are lengthy and include hyphens. Any component name used must be exactly as it appears on the list.
See the Component Names list example below.
Note: The component names are the same as those shown in the Server Administrator > Disaster Recovery Settings dialog box.
Use the following commands to set Primary and Backup site values at the Command line.
drconfig.exe -setprimary “Component Name” “Value”
drconfig.exe -setbackup “Component Name” “Value”
The component name must match the description found in the Server Administrator > Disaster Recovery Settings dialog box or the Component Names list generated by using drconfig.exe -components.
Both Component Name and Value must be enclosed with quotes.
Example: drconfig.exe -setbackup “AccuRoute Queue” “10.43.16.5”
The following Return code is shown if an invalid component name was used.
- 4 No such component.
The following Return code is shown if duplicate component names were used.
- 5 There are duplicate component names in the drconfig settings.
Processing cannot be completed if duplicate component names exist. The Administrator must go to the Server Administrator > Disaster Recovery Settings, select OK to save the settings and try again.
Administrators can specify a blank string when setting a component value to localhost, for example, drconfig.exe -setbackup “AccuRoute Queue” “”. The use of “localhost” or “<localhost>” is not required.
There is no validation performed on the values being set. The Disaster Recovery executable file will set any value you specify.
Note: Value changes made to a running configuration will be saved but will not take effect until the next cutover is initiated to that configuration.
Use drconfig.exe -cutover to initiate a cutover between the Primary and Backup sites, for example, if the Primary site is running then a cutover is initiated to the Backup site. Ensure that the Server Administrator is not running. It may interfere with the startup and shutdown of the services.
Note: The -cutover parameter is the same as the Switch Site function in the Server Administrator > Disaster Recovery Settings dialog box.
If duplicate component names exist, a -5 Return code is generated, the cutover is not completed. The Administrator must go to the Server Administrator > Disaster Recovery Settings, select OK to save the settings and try again.
Return codes are generated by the Disaster Recovery executable file to provide you with status, troubleshooting and action-related details. Return codes that contain zero or positive values are successes. Return codes that contain negative values are failures that require action.
Note: The process calling the Disaster Recovery executable file will only get the return code results (just the values). You determine how you want your application to manage the Return codes, for example, show the return codes and descriptions.
Use drconfig.exe -? at the Command line to see the following list of Return codes and descriptions.
Success
Return Code | Description |
---|---|
0 | Success |
1 | Success Primary is active (shown with the drconfig.exe -status parameter) |
2 | Success Backup is active (shown with the drconfig.exe -status parameter) |
Failure
Return Code | Description |
---|---|
- 1 | Invalid parameter - An invalid drconfig.exe -parameter was used at the Command line. Ensure -parameter used is valid. |
- 2 | Disaster Recovery has not been initialized via the Server Administrator. The Administrator must set up Disaster Recovery in the Server Administrator. |
- 3 |
Cannot connect to Message Server on localhost. Ensure all product services are running. |
- 4 | No such component. A component name used does not exist. Ensure component name(s) is valid. |
- 5 | There are duplicate component names in the drconfig settings. Processing cannot be completed if duplicate component names exist. The Administrator must go to the Server Administrator > Disaster Recovery Settings, select OK to save the settings and try again. |
- 500 | Unknown error, contact Technical Support. |
See also
Optional Configurations - Disaster Recovery Solution