HOWTO - Using omnir to do a quick restore for selected backed-up objects (FILESYSTEM BACKUP)

  • KM02757752
  • 23-Mar-2017
  • 23-Mar-2021

Summary

Data Protector CLI "omnir" for restore of a file from a FILESYSTEM BACKUP.

Question

Using omnir to do a quick restore for selected backed-up objects (FILESYSTEM BACKUP)

Data Protector CLI "omnir" for restore of a file from a FILESYSTEM BACKUP.

In some situation or troubleshooting restore issues or need to create a script for automation, using omnir would be the simple and quick way to do things - to check or try to restore selected backed-up object from a filesystem backup.


Here are the steps.

1. Identify all of the backup media - query the IDB

Example :

omnidb -sess 2017/02/04-3 -media

Output (examples) :

Medium Label                   Medium ID                            Free Blocks
===============================================================================
SERVER_A-TEST_TAPE        0f4012c8:42aa9869:1ef2:0001                    0

 

2. Generate catalog information - query the IDB

Example :

omnimm -catalog  0f4012c8:42aa9869:1ef2:0001

Session : 2017/02/04-3

ObjectName    : test.hpqcorp.net:/F 'F: [HERMES]'
ObjectType    : WinFS
DiskAgentID   : 1365045366
Object Status : Completed
==============================================================================
d----w----          0 1/30/2017 10:57:41 AM /WORK/TEST/BACKUP-DIR/
-r--r-----       4653  2/1/2017 3:05:14 PM /WORK/TEST/BACKUP-DIR/EUL_4262639-until-15March2016.dat
----r-----       4653 1/30/2017 10:57:09 AM /WORK/TEST/BACKUP-DIR/EUL_4491698.dat
----r-----        214 1/30/2017 10:33:10 AM /WORK/TEST/BACKUP-DIR/LEGO.txt
----r-----       2711 1/30/2017 10:33:10 AM /WORK/TEST/BACKUP-DIR/list.txt
----r-----      17583 1/30/2017 10:33:10 AM /WORK/TEST/BACKUP-DIR/omni0411nov.txt

Dump to 1 text file output for easy reference.


3. Load the identified media to the library slots and ensure drive is free to use.

 

4. Run restore using "omnir" - all or selected / into same or different directory

Specify the parameter to restore specific backed-up object.

IMPORTANT : Take note of the complete ObjectName.


Example :

Restore everything and on the same directory

omnir -host TEST.hpqcorp.net -session 2017/02/04-3 -full

 

Restore everything but on another directory

omnir -winfs TEST.hpqcorp.net:/F "F: [HERMES]" -session 2017/02/04-3 -tree /WORK/TEST/BACKUP-DIR/ -into /WORK/TEST/RESTORE-DIR/

 

Restore selected files *.txt and into another directory - using wildcard

omnir -winfs TEST.hpqcorp.net:/F "F: [HERMES]" -session 2017/02/04-3 -tree /WORK/TEST/BACKUP-DIR/ -only *.txt  -into /WORK/TEST/RESTORE-DIR/

 

Restore 1 file and into a test directory

omnir -winfs TEST..hpqcorp.net:/F "F: [HERMES]" -session 2017/02/04-3 -tree /WORK/TEST/BACKUP-DIR/ -only EUL_4491698.dat -into /WORK/TEST/RESTORE-DIR/

omnir -winfs TEST.hpqcorp.net:/F "F: [HERMES]" -session 2017/02/04-3 -tree /WORK/TEST/BACKUP-DIR/ -only EUL_4491698.dat -into C:/Temp


It is still recommended to use Data Protector GUI for restore, as first option and that omnir CLI is only when there is a specific need for it.

 

Reference :

https://support.microfocus.com/kb/kmdoc.php?id=KM01024648/hpe_man_DP9.07_CLIReference_pdf.pdf