DS-Client Help : Working with backups : Configuring Pre/Post processes (Windows)
 
Configuring Pre/Post processes (Windows)
You can use the Pre/Post option to specify a command to run before (Pre) and/or after execution (Post) of the backup.
1. Browse the backups tree and select the backup.
2. On the Sets menu, point to Backups, and then click Properties.
3. In the Set Properties dialog box, click the Options tab, and then click Pre/Post.
4. Under Perform this activity before backup, do one of the following:
To execute a Pre/Post command on a remote machine, where the files of the backup are located, select the Execute on remote system check box.
NOTE:  This option is disabled if the backup is on the local DS-Client computer.
To run a command, select Run command, and then type the command.
NOTE:  You must type “cmd /c” before the command if it is not the name of an executable file. This command must not run anything that requires user input.
On a local DS-Client machine, DS-Client will terminate the process if the command requires user input.
On a remote Windows machine, the connect as properties of the backup must have administrator privileges because the schedule service is used to run the command on the remote Windows machine.
On a remote Linux machine, ensure the rexec service is running on the remote machine.
To stop a service before backup, select Stop service, click [>>], and then select the service.
To start a service before backup, select Start service, click [>>], and then select the service.
The following options are available only for Netware:
Run NCF– Runs the command batch file specified in the box on the remote NetWare server. All the rules for running NCF from the console are applied. If the NCF is not in the search path, you must provide the full path (sys:dir_name\name.ncf). The NCF file must be in 8.3 name format, since the console does not understand long file names. You must have Console Operator Rights.
Unload NLM – Unloads the NLM (NetWare Loadable Module) specified in the box. You must have Console Operator Rights.
Load NLM– Loads the NLM (NetWare Loadable Module) specified in the box. You must have Console Operator Rights.
5. Select the condition when you want the DS-Client to perform the activity before backup. The options are as follows:
On exit code – The condition is applied if the exit code (for local commands), is equal (=) or not equal (<>) to the exit code entered in the box. This is applicable if you know that the command will produce an exit code when finished.
On file existence – The condition is applied if a particular file exists or not. Enter the full path (include the drive on local machines; include the share but not the server on remote machines) in the box.
On output string – The condition is applied (Local commands & UNIX only) if the command output contains a particular string or not. Enter the string (case sensitive) in the box. For a large output string, only the first 16K is checked for occurrences of the string.
On execution success – The condition is applied if the command is executed successfully.
On execution failure – The condition is applied if the command fails to execute.
Or execution failure – Select the Or execution checkbox to combine the condition of execution failure with the exit code, file existence or output string conditions.
Don’t perform Post activity – If a selected condition is fulfilled, the DS-Client will not perform the post activity.
Don’t perform backup – If a selected condition is fulfilled, the DS-Client will not perform the backup and restore.
Delay backup – You can delay the backup/restore in situations where the command activates background processes responsible for creating data for backup. This also allows time for the pre activity to terminate properly.
NOTE:  You must not use Test Pre with the delay option because a delay of more than 60 seconds results in a timeout.
6. Under Perform this activity after backup, do one of the following:
To stop a service after backup, select Stop service, click [>>], and then select the service.
To start a service after backup, select Start service, click [>>], and then select the service.
The following options are available only for Netware:
Run NCF– Runs the command batch file specified in the box on the remote NetWare server. All the rules for running NCF from the console are applied. If the NCF is not in the search path, you must provide the full path (sys:dir_name\name.ncf). The NCF file must be in 8.3 name format, since the console does not understand long file names. You must have Console Operator Rights.
Unload NLM – Unloads the NLM (NetWare Loadable Module) specified in the box. You must have Console Operator Rights.
Load NLM– Loads the NLM (NetWare Loadable Module) specified in the box. You must have Console Operator Rights.
7. Select the condition when you don’t want the DS-client to perform the activity after backup. The options are as follows:
Successful – The DS-Client will not perform the activity if the backup or restore is successful.
With errors – The DS-Client will not perform the activity if the backup or restore is completed with errors.
Incomplete – The DS-Client will not perform the activity if the backup or restore is incomplete.
8. Click Test Pre or Test Post to test the command.
IMPORTANT:  You must not use Test Pre and Test Post with a combination of Stop Service and Start Service commands, because this will only execute the Pre command, effectively stopping a service until you manually restart the service.
9. Click OK.