Command Line Interface - Restore - SAP Oracle iDataAgent

Configuration Backup Restore

Use XML to restore databases.

You can include the XML parameters in the xml file, or you can specify them on the command line when they frequently change. For more information on command line parameters and XML elements, see Command Line - Syntax.

Before You Begin

Procedure

  1. Run the qlogin command to log on to the CommServe computer.
  2. Download the restore_template.xml file to the computer where you will run the command.
  3. Open the restore_template.xml file, add your specific parameters, and save the file.

    For information on supported instance XML parameters, see SAP for Oracle XML Instance Parameters.

  4. On the command line, go to Software_Installation_Directory/Base and type the command.

    qoperation execute -af restore_template.xml -appName 'SAP for Oracle' -clientName 'client_name' -instanceName 'instance_name' –subclientName 'subclient_name' -destClient/clientName 'dest_client_name' -switchDatabaseMode true -restoreStream 'number_restore_streams'

  5. Verify the status of the job. On the command line type the command:

    qlist job –j job_id

  6. Once the job completes, run the qlogout command to log off the CommServe computer.

Example

Restoring Data and Log from Latest Browse

qoperation execute -af restore_template.xml -appName 'SAP for Oracle' -clientName client1 -instanceName instance1 -destClient/clientName client2 -switchDatabaseMode true -restoreStream 8

Generate the Command Line Script from the CommCell Console

In addition to the parameter values provided in the template xml file, if you want to include additional options for the restore, you can do so by selecting the required options from the CommCell Console and generate the command line xml script for the restore operation.

Follow the steps given below to generate a script which you can use to perform a restore from the command line interface:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | SAP for Oracle | <Instance>
  2. Right-click the <Instance> and then click All Tasks | Browse and Restore.
  3. Click OK.
  1. In the right pane of the Browse window, select the data that you want to restore and click Recover All Selected.
  2. Select the required restore options which you want to execute using the script.
  3. Click Save as Script.

  1. Enter the location to save the script along with the file name and extension. For example, "C:\scripts\myscript.bat" on Windows and "/usr/scripts/myscript.sh" on Unix. Alternatively, you can also click Browse and navigate to the location.

    The script will be saved as a .xml file and .bat/.sh file.

    If a file with the same name already exists in the specified location, both the .xml and .bat/.sh files will be overwritten.

  2. Enter the username and password for the user account which you want to use to perform the restore.

    By default, the user account which you have used to login to CommCell console is used for performing the restore. However, if the user account does not have access to application and database, click Use a different account.

  3. Click OK.