Running RMAN Scripts with QCommands

You can run RMAN scripts from the command line by using qCommands.

When you use the qCommand method, you can use the following CommServe features:

  • Job management

  • Reporting

  • Media reservation

  • Storage policies

  • Multi-stream operations

When you submit the job, the Commvault software uses one job ID that crosses different streams and job attempts.

The following rules apply to RMAN scripts that are run from the Commvault command line by using qCommands:

  • You submit the RMAN scripts by using argument files.

  • You can view the job history.

  • You can obtain the media list for the primary or secondary copy.

  • You can use job-based storage policies.

  • You can allocate multiple streams before you start the job.

The job uses as many drives as are available and starts additional streams as drives become available. The Commvault software uses run time reservation of a storage policy. For example, if a log backup is encountered in the data phase, the software releases all data storage policy resources and dynamically reserves archive log resources.

Procedure

  1. Create an RMAN script similar to the one below, substituting any required or optional Oracle SBT parameters.

    For information on required and optional SBT parameters, see SBT Parameters.

    run {
    allocate channel ch1 type 'sbt_tape'
    allocate channel ch2 type 'sbt_tape'
    restore database;
    recover database ;
    alter database open;
    }
  2. Create the input argument file. The following script shows the syntax of the input argument file.

    [destinationclient]client_name [datatype] DATA [oraclerestorescript]script_name [options] QR_ORA_NO_CATALOG QR_ORA_RESTORE

    where:

    • client_name is the name of the destination client

    • script_name is the full path to the Oracle RMAN script you created, for example /tmp/script.rman

  3. Run the qlogin command.

  4. On the command line, type the following command for the restore operation:

    qoperation restore -sc client_name -a Q_ORACLE -i INSTANCE -af argument_file

    where:

    • client_name is the name of the client

    • instance is the name of the instance

    • argument_file is the full path to the input argument file you created

Page contents

×

Loading...