Command Line Interface - Restore - OnePass for Exchange Mailbox (Classic)

Performing a Restore

You can run restore operations from the command line interface.

Before You Begin

You must create an input XML file.

Procedure
  1. From Command prompt, navigate to <software installation directory>\Base and run the following command:

    qlogin -cs <commserve name> -u <user name>

  2. Navigate to the location where the .xml file is saved and execute the saved .xml script using the qoperation execute command.

    qoperation execute -af restore.xml

  3. Verify the status of the job using the following command:

    qlist job -j jobID
  4. Once the job completes, log off from the CommServe using the qlogout command.

    qlogout [−cs <commserve_host_name>] [−all] [−tf <tokenfile>] [−tk <token>] [−h]
Examples

Restoring from a Current Backup

qoperation execute -af restore.xml -appName 'Exchange Mailbox' -clientName client1 -backupsetName backupset1 -destPath '/etc4' -sourceItem '/etc'

Restoring Files to a Point-in-Time (Date)

qoperation execute -af restore.xml -appName 'Exchange Mailbox' -clientName client1 -backupsetName backupset1 -destPath '/etc4' -sourceItem '/etc' -toTimeValue 2011-11-28

Restoring Files to a Point-in-Time (Date and Time)

qoperation execute -af restore.xml -appName 'Exchange Mailbox' -clientName client1 -backupsetName backupset1 -destPath '/etc4' -sourceItem '/etc' -toTimeValue '2011-11-28 15:40:00'

Finding Data

The following command is available for finding backed up data.

qlist backupfiles
Description

This command performs a search operation on backed up files and saves the results to a file. The type of operation is defined in the opType attribute in the XML request file:

  • Find: Performs a recursive search and returns a list of files and folders. Specify recursion by using asterisks in the path attribute as shown: <paths path="C:\data\**\*" />.

  • Browse: Performs a search on one directory and returns a list of files and folders in that directory. (The Browse operation is not recursive.)

  • Versions: Lists all of the versions of a single file.

For the Find and Browse operations, you can limit the results to backed up files for a specific job by using the <jobId> element in the XML request file.

In case of an error, an error code and description are displayed as: "backupfiles: Error errorcode: errordescription"

Usage
qlist backupfiles -af <path_to_input_XML_file> -dpath <path_to_output_XML_file> [-tf <tokenfile>] [-tk <token>] [-example] [-h]
Options

-af

XML file that contains the request

-dpath

Destination path and file name for the XML output file

-tf

Reads token from a file

-tk

Token string

-example

Sample "find" and "browse" XML requests

-h

Displays help

Diagnostics

Possible exit status values are:

0 - Successful completion.

1 - CLI usage failures, due to the use of an unsupported option or missing argument.

2 - Any other failure.

Examples
  • For the default subclient, finds all of the files and folders in the C:\data directory and its subdirectories.

    qlist backupfiles -af c:\searches\find.xml -dpath c:\results\find_results.xml

    XML example for the Find operation:

    <databrowse_BrowseRequest opType="Find">
      <entity _type_="0" appName="Windows File System" backupsetName="defaultBackupSet" clientName="vmcs100_cn" subclientName="default"/>
      <paging pageSize="4294967295" skipNode="0"/>
      <mode mode="2"/>
      <paths path="C:\data\**\*" />
     </databrowse_BrowseRequest>
  • For the default subclient, browses the files and folders in the C:\ directory.

    qlist backupfiles -af c:\searches\browse.xml -dpath c:\results\browse_results.xml

    XML example for the Browse operation:

    <databrowse_BrowseRequest opType="Browse">
      <entity _type_="0"appName="Windows File System" backupsetName="defaultBackupSet" clientName="vmcs100_cn" subclientName="default"/>
      <mode mode="2"/>
      <paging pageSize="4294967295" skipNode="0"/>
      <paths path="C:\"/>
      <timeRange fromTime="0" toTime="1331280338"/>
     </databrowse_BrowseRequest>
  • For job ID 857 run on the default subclient, browses the files and folders in the C:\ directory.

    qlist backupfiles -af c:\searches\find.xml -dpath c:\results\find_results.xml

    XML example for the Browse operation for a specific job ID:

    <databrowse_BrowseRequest opType="Browse">
      <entity _type_="0"appName="Windows File System" backupsetName="defaultBackupSet" clientName="vmcs100_cn" subclientName="default"/>
      <mode mode="2"/>
      <paging pageSize="4294967295" skipNode="0"/>
      <paths path="C:\"/>
      <timeRange fromTime="0" toTime="1331280338"/>
      <advOptions>
        <advConfig>
          <browseAdvancedConfigBrowseByJob>
            <jobId>857</jobId>
          </browseAdvancedConfigBrowseByJob>
        </advConfig>
      </advOptions>
    </databrowse_BrowseRequest>
  • For the default subclient, lists the versions available for the mydata.txt file.

    qlist backupfiles -af c:\searches\versions.xml -dpath c:\results\versions_results.xml

    XML example for the Versions operation:

    <databrowse_BrowseRequest opType="Versions">
      <entity _type_="0"appName="Windows File System" backupsetName="defaultBackupSet" clientName="vmcs100_cn" subclientName="default"/>
      <mode mode="2"/>
      <paths path="C:\Users\Administrator\Documents\test\mydata.txt"/>
    </databrowse_BrowseRequest>

Loading...