Open topic with navigation
You are here: Mirroring > Running scripts during mirroring
Running scripts during mirroring
You can customize your mirroring process by running customized scripts on the target at predefined points in the mirroring process. Scripts may contain any valid Windows command, executable, batch, or script file. The scripts are processed using the same account running the Double-Take service, unless you provide specific credentials on the Server Properties Script Credentials tab for the target server. There are three types of mirroring scripts.
- Mirror start—This script starts when the target receives the first mirror operation. In the case of a difference mirror, this may be a long time after the mirror is started because the script does not start until the first different data is received on the target. If the data is synchronized and a difference mirror finds nothing to mirror, the script will not be executed.
- Mirror stop—This script starts when a mirror is stopped, which may be caused by an auto-disconnect occurring while a mirror is running, the service is shutdown while a mirror is running, or if you stop a mirror manually.
- Mirror complete—This script starts when a mirror is completed. Because the mirror statistics may indicate a mirror is at 100% when it is actually still processing (for example, if files were added after the replication set size was calculated, if there are alternate data streams, and so on), the script will not start until all of the mirror data has been completely processed on the target.
- Open the Replication Console.
- Right-click the connection on the right pane of the Replication Console and select Connection Manager.
- Select the Scripts tab.
- For each of the three predefined points in the mirroring process, specify the following information.
- Script path—Specify the path and filename for each script.
- Arguments—If needed, specify any arguments that are required to execute your script. The arguments must be valid for your script.
- Allow interaction with the Desktop—Enable this option if you want the script processing to be displayed on the screen. Otherwise, the script will execute silently in the background.
- Delay until script completes—Enable this option if you want to delay all Double-Take Availability processing until the script finishes processing.
- Test Script—You can test your script manually by clicking Test Script. Your script will be executed if you test it. If the test is successful, the Test Script button will become disabled. If necessary, manually undo any changes that you do not want on your target after testing the script.
- Click OK to save the settings.
Note: |
Mirror scripts are dependent on the target and target path location of a connection. Therefore, if you establish mirror scripts for one connection and then establish additional connections to the same target using the same target path location, the mirror scripts will automatically be applied to those subsequent connections. If you select a different target path location, the mirror scripts will have to be reconfigured for the new connection(s). |
Related Topics