Example 7-1, Smrecov macro – HP NonStop G-Series User Manual

Page 106

Advertising
background image

File Protection and Recovery for Virtual Disks

HP NonStop Storage Management Foundation User's Guide523562-008

7-6

Recovering an Entire Disk

Example 7-1. SMRECOV Macro (page 1 of 2)

?section smrecov macro
==
== This macro will create two obey files. Update the first file
== with the appropriate restore options. The second file is an
== in file for SMFIXUP and contains ZOT commands.
==
== Usage:
== SMRECOV <tape> <vdp> <physvol-name> <restore-file> <zot-file>
== where
== <tape> is the input file for RESTORE
== <vdp> is the VDP process name
== <physvol-name> is the physical volume name
== <restore-file> and <zot-file> are the output file locations

#frame
#push FixupBuffer
#push FixupLine
#push LogicalSubvolName
#push LogicalFileName
#push FileLen
#push PhysicalFileName
#push OutputBuffer
#push ZotBuffer
#push firsttime
#set firsttime 1

#push TAPE
#set TAPE %1%
#push VDP
#set VDP %2%
#push PHYSVOL
#set PHYSVOL %3%
#push OUTFILE
#set OUTFILE %4%
#push ZOTFILE
#set ZOTFILE %5%
==
== Extract the findfiles output to the variable and get set up to
== scan the lines.
==

#push #inlineprefix
#set #inlineprefix +
smfixup/inline , outv FixupBuffer/
+ findfiles [vdp] physvol [physvol]
#inlineeof
#output Findfiles completed, Scanning the output.
#output Please wait.

Advertising