beautypg.com

Smf catalog file recovery, More information, see – HP NonStop G-Series User Manual

Page 107

background image

File Protection and Recovery for Virtual Disks

HP NonStop Storage Management Foundation User's Guide523562-008

7-7

SMF Catalog File Recovery

SMF Catalog File Recovery

SMF catalog files are Enscribe files protected by TMF (HP highly recommends
TMF file recovery protection). However, recovery of catalog files must be done in
distinct phases to ensure that the integrity of the SMF subsystem and databases is
maintained..

==
== Scan each line, look for the 3rd token to be a number. If it’s a number,
== we have a findfiles entry. Format the backup line if this file is not
== on the user specified physvol.
==
[#loop |while| (not [#emptyv FixupBuffer]) |do|
#extractv FixupBuffer FixupLine
[
#setmany LogicalSubvolName LogicalFileName FileLen
PhysicalFileName,[FixupLine]
]
[#if ((FileLen '>' "00" ) and (FileLen '<' "27")) |then|
[#if [#match [physvol]* [PhysicalFileName]] |then|
[#if [#match ZSMSCAT [LogicalSubvolName]] |then| |else|
#append ZotBuffer ZOT [vdp].[LogicalSubvolName].[LogicalFileName]
[#if [#match 1 [firsttime]] |then|
#set firsttime 0
#append OutputBuffer %1% [tape] , (
#append OutputBuffer [vdp].[LogicalSubvolName].[LogicalFileName]
|else|
#append OutputBuffer ,[vdp].[LogicalSubvolName].[LogicalFileName]
]
]
]
]
]
[
#if [#match 0 [firsttime]]
|then|
#append OutputBuffer )
|else|
#append OutputBuffer COMMENT No Files to Restore
#output Error: There are no files on [vdp] where physvol [physvol]
]

==
== If you want to add specific options to the Restore commands, update
== the OUTFILE with appropriate options, as shown
== below
==
== #append OutputBuffer , listall
==
#output Creating output files [outfile], and [zotfile]
vartofile OutputBuffer [OUTFILE]
vartofile ZotBuffer [ZOTFILE]
#output Done!
#output Please edit the files as required and obey them:
#output smfixup /in [zotfile]/
#output restore /in [outfile]/
#unframe

== END OF SMRECOV

Note. Due to the critical nature of SMF catalog files, HP highly recommends that SMF
catalogs be given full TMF recovery protection by taking frequent on line dumps and placing
them on mirrored volumes.

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