Skip to main content
SnapManager Oracle

Creating task specification file and scripts for SnapManager operations

Contributors NetAppZacharyWambold

SnapManager for Oracle uses a task specification Extensible Markup Language (XML) file that indicates the pretasks and post-tasks for the backup, restore, and clone operations. You can add the pretask and post-task script names in the XML file for the tasks to be performed before or after the backup, restore, and clone operations.

In SnapManager (3.1 or earlier), you can run the pretask and post-task scripts only for the clone operation. In SnapManager (3.2 or later) for Oracle, you can run the pretask and post-task scripts for the backup, restore, and clone operations.

In SnapManager (3.1 or earlier), the task specification section is part of the clone specification XML file. From SnapManager 3.2 for Oracle, the task specification section is a separate XML file.

Note SnapManager 3.3 or later does not support the use of the clone specification XML file created in the releases before SnapManager 3.2.

In SnapManager (3.2 or later) for Oracle, you must ensure that the following conditions are met for successful SnapManager operations:

  • For backup and restore operations, use the task specification XML file.

  • For the clone operation, provide two specification files: a clone specification XML file and a task specification XML file.

    If you want to enable pretask or post-task activity, you can optionally add the task specification XML file.

You can create the task specification file by using the SnapManager graphical user interface (GUI), command-line interface (CLI), or a text editor. You must use a .xml extension for the file to enable appropriate editing features. You might want to save this file so that you can use it for future backup, restore, and clone operations.

The task specification XML file includes two sections:

  • The pretasks section includes scripts that could be run before the backup, restore, and clone operations.

  • The post-tasks section includes scripts that could be run after the backup, restore, and clone operations.

The values included in the pretasks and post-tasks sections must adhere to the following guidelines:

  • Task name: The name of the task must match the name of the script, which is displayed when you run the plugin.sh -describe command.

    Note If there is a mismatch, then you might receive the following error message: the file not found.
  • Parameter name: The name of the parameter must be a string that can be used as an environment variable setting.

    The string must match the parameter name in the custom script, which is displayed when you run the plugin.sh -describe command.

You can create the specification file based on the structure of the following sample task specification file:

<task-specification>
  <pre-tasks>
<task>
      <name>name</name>
      <parameter>
          <name>name</name>
          <value>value</value>
       </parameter>
    </task>
  </pre-tasks>
  <post-tasks>
    <task>
      <name>name</name>
      <parameter>
          <name>name</name>
          <value>value</value>
       </parameter>
    </task>
  </post-tasks>
</task-specification>
Note The task specification XML file should not contain any policy.

From the SnapManager GUI, you can set the parameter value and save the XML file. You can use the Task Enabling page of the Backup Create wizard, Restore or Recovery wizard, and Clone Create wizard, to load the existing task specification XML file, and use the selected file for the pretask or post-task activity.

A task can be executed multiple times, either with the same or different parameter and value combinations. For example, you could use a Save task to save multiple files.

Note SnapManager uses the XML tags provided in the task specification file for the preprocessing or post-processing activity for the backup, restore, and clone operations irrespective of the file extension of the task specification file.