Command Line Interface - How To
Topics | QScripts | How To | Troubleshoot | Support | Related Topics
Command Line Interface - Save a Job as a Script
Set up the qoperation find Command
Command Line Interface - Save a Job as a Script
Related Topics:
See Command Line Interface - Support to find out what command line features your agent supports. These scripts call
an executable in the installation directory that submits your saved jobs and
selected options to the CommServe.
To save as a
script:
- From the CommCell Console, begin one of the following procedures:
- Select Save as a Script and any options that you want to execute when
the script is run.
- Click OK to open the
Saving the Job as a Script dialog box.
- Select the location of the client on which you want to save the script.
- Enter or Browse to a path and name for the script file to be saved
on the CommServe computer.
- Select Synchronous or Asynchronous execution. Some job types
will always be performed asynchronously and the synchronous option will be
disabled.
- A synchronous operation exits only when the operation has completed.
- An asynchronous operation submits the job to the CommServe and exits
immediately, returning control to the calling program or script.
-
If a script with same name exists, you can decide if the existing script must
be overwritten. In addition, you can decide the extension of the save as script
file.
- Click OK to save the operation as a script file.
-
You can also save a script remotely.
Set up the qoperation find Command
Related Topics:
To set
up the qoperation find command:
- From the CommCell Console, start a browse for the node level whose content
you want to search.
-
Select the desired data for restore and click Recover All Selected.
-
From the Restore Options (General) tab, click any desired options. Then
click the
Job Initiation tab.
- From the Job Initiation tab, select Save as a Script and any options that you want to execute when
the script is run.
- Click OK to open the
Saving the Job as a Script dialog box.
- Select the location of the client on which you want to save the script
file and the argument file.
- Enter or Browse to a path and name for the script file and
argument file to be saved
on the CommServe computer.
- Select Synchronous or Asynchronous execution. Some job types
will always be performed asynchronously and the synchronous option will be
disabled.
- A synchronous operation exits only when the operation has completed.
- An asynchronous operation submits the job to the CommServe and exits
immediately, returning control to the calling program or script.
-
If a script with same name exists, you can decide if the existing script must
be overwritten. In addition, you can decide the extension of the save as script
file.
- Click OK to save the operation as a script file and also to
generate a corresponding argument file. A message identifying the name of
each file will be displayed (e.g., script file
find03.bat and corresponding argument file
find03.bat_1121988100.tmp may be displayed).
-
You can also save a script remotely.
- Modify the contents of the script file to include the correct form of
the qoperation find command. For example,
script file find03.bat below could be
updated to include argument file
find03.bat_1121988100.tmp in the command line as follows:
setlocal
if not defined GALAXY_BASE set GALAXY_BASE=C:\Program
Files\<software installation path>\Base
set PATH=%PATH%;%GALAXY_BASE%
qlogin -af "find03.bat_1121988100.tmp"
if %errorlevel% NEQ 0 (
echo Login failed.
goto next_script_1211988100
qoperation find -af "find03.bat_1121988100.tmp"
set OrigErrLevel=%errorlevel%
qlogout
if %errorlevel% NEQ 0 (
echo Logout failed. )
if %OrigErrLevel% NEQ 0 exit /b %OrigErrLevel%
:next_script_1211988100
- Modify the contents of the argument file as follows:
- Replace all the values for the [options]
option with the following values: QR_BROWSE,
QR_NORECURSE,
QR_NOIMAGE, and QR_WILDCARD.
- For the [sourcepaths] option,
include the appropriate path with wildcards for backup content
search purposes (e.g., C:\**\abc*.bat).
- Make any other required changes.
You are now ready to run the qoperation find
command.
Back To Top