SnapManager includes the ability to automatically run your own program or script after a backup or database verification operation finishes successfully. This feature, called Run Command After Operation, is typically used to automatically archive a backup. See the following topics for more information:
Attention
Make sure that you archive all components of a backup set together. For more information, see SnapManager backup sets.
When you start or schedule a SnapManager backup or database verification operation, you can specify that SnapManager automatically run a command after the operation finishes successfully. If you choose this option, you will be prompted to specify the following information:
Because the command is invoked from within the context of a specific backup or database verification, you can pass the command information about the components of that operation.
In your script, any occurrence of the text string %1 corresponds to the first parameter passed; the text string %2 corresponds to the second parameter, and so on.
The Run Command After Operation feature supports the following variables, which can pass operation-specific information to your program or script.
The $SnapInfoPath variable is automatically enclosed within double quotes so that the actual path name can contain spaces without affecting the script invocation on the Windows command line. If you do not want the double quotes to appear in your command line, remove them from the Command Arguments field in the Run Command After Operation dialog box.
While specifying a SnapManager backup or verification operation, you can use the Run Command After Operation dialog box to specify the details of the command you want to run after the backup or verification operation finishes.
Note
You can specify default values for the command arguments so that you do not have to enter the command information each time you initiate a backup or verification. For details, see Managing the Run Command After Operation default settings.
To run a command or invoke a batch file after backup or verification, complete the following steps.
| 1 | ||
ResultThe Run Command After Operation dialog box appears and displays the current default settings. |
||
| 2 |
In the "Specify a computer where..." box, enter or browse to the name of the host on which your program or script resides. |
|
| 3 |
In the "Specify the full path..." box, browse to your program or script. Note |
|
| 4 |
Form the command input string in the Command Arguments box. You can do this using any combination of the following methods:
Notes
For details, see Command arguments pass information to your program or script. |
|
| 5 |
Repeat Step 4 as needed until the Command Arguments box contains the arguments you want to pass to your program or script. |
|
| 6 |
Click OK to apply your changes, close the Run Command After Operation dialog box, and return to the backup or verification setup process. Result:After when the backup or verification finishes successfully, the command you specified, with the Snapshot copy and SnapInfo information for this backup operation inserted, runs automatically. |
|
Suppose you want to run the script C:\SnapManager Scripts\scriptname.txt with the following parameters:
The corresponding Run Command After Operation dialog box would look like this:
For more examples, see Using NDMP or dump to archive SnapManager backups and Using a Windows backup utility to archive SnapManager backups.
If SnapManager is installed on a Windows Server 2003 system, then attempting to launch a script from a UNC (Uniform Naming Convention) path might cause SnapManager to hang. If this occurs, the log file shows no indication of the failure other than it is missing the last line of text: "The specified command has been launched successfully."
Windows Server 2003 ships with Internet Explorer's Enhanced Internet Explorer Security Configuration enabled. This setting is restrictive and prevents batch files located on a network share from running. The network location will need to be added to Internet Explorer's list of trusted sites.
To run a script from a UNC path on a Windows Server 2003 system, complete the following steps.
| 1 |
Log in to the Windows Server 2003 system that will be running the script.
|
|
| 2 | ||
| 3 |
In the menu bar, select Tools > Internet Options. Result |
|
| 4 |
In the Internet Options dialog box, do the following: Result |
|
| 5 |
In the Local Intranet dialog box, do the following: Result |
|
| 6 | ||
| 7 | ||
| 8 |
To verify your changes, browse to the network location where the script resides and launch the script. ResultThe script should now run normally without security prompts. Note |
|
Note
These security settings are specific to each user account on each machine. You will need to repeat this procedure for on all machines that might be used to run scripts and for all users that might launch the script on each machine. You will also need to repeat these steps if you start using a different user account to run SnapManager.
Copyright © 1994-2006, Network Appliance, Inc. All rights
reserved.
Part No. 215-01873_A0
File: archive7.htm
Last updated: 28-Mar-2006 11:31:09