Command Line Interface - Save As Script

Topics | QCommands | Save As Script | XML Scripts | QScripts | QAPI Developers Guide | How To | Troubleshoot | Support | Related Topics


Overview

Important Considerations

Operations Supported by Save As Script


Overview

Several operations enable you to pick the options from the CommCell Console and save them as script files using the Save As Script option. These scripts are saved to the specified location in .xml format and can later be executed from the command line interface using the qoperation execute command.

For step-by-step instructions on saving a job as script, see Save a Job as a Script.

For step-by-step instructions on executing a script using qoperation execute command, see Execute Scripts using qoperation execute Command.

The Save As Script feature is currently supported for all operations that can be scheduled from the CommCell Console. For supported options, see Operations Supported by Save As Script.

How Does Save As Script Work?

During Data Protection, Recovery, Auxiliary Copy, Disaster Recovery Backup, or Data Aging operations, you can select the options and save them as a script using the Save As Script option from the CommCell Console. The Save As Script option generates two files: .bat and .xml.

The .bat file contains the following commands:

The .xml file is the script file that contains information on the options selected from the CommCell Console. This .xml file is given as input to the qcommand execute in the batch file.

When saving the script, if the file name already exists, the batch file is overwritten whereas the .xml file is saved with a timestamp on the file name.

The batch file can be executed in two modes:

Users can now save the job options as Save As Script in a local folder on a client machine. They can enter their credentials and provide the destination path on client machine to which they want to save the file.

Replacement of Parameters

Once the script is generated, you can remove or modify the parameters in the script in the following way:

Qoperation execute –af a.xml -parameter value

Here, the value for the parameter name gets replaced. If the parameter occurs multiple times in the .xml then all the fields with that parameter name gets replaced. If only one parameter needs to be modified, you need to specify it as parent/node (i.e. the X Path).

When running the batch file in the command prompt, you can also set any parameter from the generated XML file in the following format:

myscript.bat -parameter value

The above syntax allows you to update specific XML parameters. Any parameter that you define in the command prompt when running the batch file will be passed into the generated XML file.

 


Important Considerations

Script Considerations

Consider the following before you save a job as a script:


Operations Supported by Save As Script

When you save an operation as a script, each option in the dialog will have a corresponding xml parameter in the script file. When executing the script, you can modify the value for any of these XML parameters as per need.

The following table indicates all the operations supported by Save As Script.

Operation Name

Dialog Box

XML Options

Auxiliary Copy Auxiliary Copy Options Command Line XML Options
Data Aging Data Aging Options (Aging Options) Command Line XML Options
Data Collection Schedule Data Collection Job Command Line XML Options
Data Protection
Active Directory Backup/Archive Options Command Line XML Options
DB2 Backup/Archive Options Command Line XML Options
Documentum Backup/Archive Options Command Line XML Options
Image Level Backup/Archive Options Command Line XML Options
Informix Backup/Archive Options Command Line XML Options
Lotus Notes Database Backup/Archive Options Command Line XML Options
Lotus Notes Document Backup/Archive Options Command Line XML Options
Netware File System Backup/Archive Options Command Line XML Options
NAS Backup Options Command Line XML Options
Microsoft Exchange Database Backup/Archive Options Command Line XML Options
Microsoft SharePoint Database Backup/Archive Options Command Line XML Options
Microsoft SQL Server Backup/Archive Options Command Line XML Options
Microsoft Windows File System Backup/Archive Options Command Line XML Options
Oracle Backup/Archive Options Command Line XML Options
Oracle RAC Backup/Archive Options Command Line XML Options
MySQL Backup/Archive Options Command Line XML Options
Sybase Backup Options Command Line XML Options
Workstation Backup Backup/Archive Options Command Line XML Options
Microsoft SharePoint Archiver Backup/Archive Options Command Line XML Options
Exchange Compliance Archiver Backup/Archive Options Command Line XML Options
Exchange Mailbox Archiver Backup/Archive Options Command Line XML Options
Exchange Public Folder Archiver Backup/Archive Options Command Line XML Options
Domino Mailbox Archiver Backup/Archive Options Command Line XML Options
File Archiver for Windows Backup/Archive Options Command Line XML Options
File Archiver for Unix Backup/Archive Options Command Line XML Options
Data Recovery
Active Directory Restore Options (General) Command Line XML Options
DB2 Restore Options (General) Command Line XML Options
Documentum Restore Options (General) Command Line XML Options
Microsoft Exchange Database Restore Options (General) Command Line XML Options
Microsoft Exchange Mailbox Restore Options for All Selected Items (General) Command Line XML Options
Microsoft Exchange Public Folder Restore Options for All Selected Items (General) Command Line XML Options
Microsoft Windows File System Restore/Recover Options (General) Command Line XML Options
Novell Groupwise Restore Options (General) Command Line XML Options
Image Level Restore Options (General) Command Line XML Options
Informix Informix Restore Options (General) Command Line XML Options
Lotus Notes Database Restore Options Command Line XML Options
Lotus Notes Document Restore Options Command Line XML Options
MySQL MySQL Restore (General) Command Line XML Options
NAS NDMP Restore Options (General) Command Line XML Options
Novell Directory Services Restore Options (General) Command Line XML Options
Oracle Oracle Restore Options (General) Command Line XML Options
Oracle RAC Oracle Restore Options (General) Command Line XML Options
PostgreSQL PostGreSQL Restore Options (General) Command Line XML Options
SAP for Oracle SAP for Oracle Restore Options (General) Command Line XML Options
Microsoft SharePoint Database Restore Options (General) Command Line XML Options
Microsoft SharePoint Document Restore Options (General) Command Line XML Options
Microsoft SharePoint Archiver Recover Options for All Selected Items (General) Command Line XML Options
Microsoft SQL Server SQL Restore Options (General) Command Line XML Options
Sybase Restore (General) Command Line XML Options
Virtual Server Restore Options (General) Command Line XML Options
Workstation Backup Restore/Recover Options (General) Command Line XML Options
Exchange Compliance Archiver Recovery Options for All Selected Items (General) Command Line XML Options
Exchange Mailbox Archiver Recovery Options for All Selected Items (General) Command Line XML Options
File Archiver for Windows Restore/Recover Options (General) Command Line XML Options
File Archiver for Unix Restore/Recover Options (General) Command Line XML Options
Content Indexing    
Offline Content Indexing Content Indexing Command Line XML Options
Online Content Indexing Content Index Options Command Line XML Options
Reports
Audit Trail Report Command Line XML Options
CommCell Configuration Command Line XML Options
CommCell Growth Command Line XML Options
CommCell Readiness Command Line XML Options
Data Retention Forecast and Compliance Command Line XML Options
Discovery Command Line XML Options
Event Command Line XML Options
Job Schedule Command Line XML Options
Job Summary Command Line XML Options
Jobs in Storage Policy Copies Command Line XML Options
Library and Drive Command Line XML Options
License Summary Command Line XML Options
Media Information Command Line XML Options
Media Prediction Command Line XML Options
NAS NDMP Backup Archives Command Line XML Options
Scratch Pool Command Line XML Options
Storage Policy Command Line XML Options
Tracking Command Line XML Options
User Capability Command Line XML Options
Schedule Policy Schedule Policy (General) Command Line XML Schedule Policy Options
Install Software Command Line XML Options for Install Software
Upgrade Software Command Line XML Options for Upgrade Software
Install Updates

Command Line XML Options for Install Updates

Remove Updates Command Line XML Options for Remove Updates
Download Software Command Line XML Options for Download Software
Copy Software Command Line XML Options for Copy Software
Uninstall Software

Command Line XML Options for Uninstall

Erase Data Command Line XML Erase Data Options
Agentless SRM Policy

 

Command Line XML Options for Agentless SRM Policy
Erase Spare Media Command Line XML Options for Erase Spare Media
Catalog Media Command Line XML Options for Catalog Media

Back to Top