Guardian Disk and Tape Utilities Reference
#set cmd RESTORE
#set done1 0
[#loop |while| (done1<>1) |do|
#set isDef [#input Is the tape info included in a define?(y/n): ]
[#case [isDef]
| y Y |
#set isDef 1
#set done1 1
| n N |
#set isDef 0
#set done1 1
| otherwise |
]
]
#set AN &
[#input Give the name of the tape or define
(e.g. $tape or =def): ]
[#if ((isDef) OR ((isDef<>1) AND [#processexists [AN] ])) |then|
#set done 1
|else|
[#if (isDef<>1) |then|
#output Non-existent Tape Process. Please check!
]
]
|otherwise|
#set #exit 1 == should never reach here
#unframe
exit
]
] ==loop
#output
===========================================
== We have the archive format and name info
== Now get going with the setup work
===========================================
#set done 0
[#loop |while| (done = 0) |do|
#set parts [#input How many (pri + sec) partitions are there in archive?: ]
[#if ((parts <= 128) AND (parts > 0) ) |then| #set done 1
|else| #output Invalid number of partitions!!!
]
]
#output
#set done 0
[#loop |while| (done = 0) |do|
#set pext &
[#input What are the primary extents (pages) for the source file?: ]
[#if ( (pext > 0) ) |then| #set done 1
|else| #output Bad PExt value!
]
]
#output
#set done 0
[#loop |while| (done = 0) |do|
#set sext &
[#input What are the secondary extents (pages) for the source file?: ]
[#if ( (sext > 0) ) |then| #set done 1
|else| #output Bad SExt value!
]
]
#output
#set done 0
[#loop |while| (done = 0) |do|
#output Provide a work location ($vol) to hold source partition files.
#output There should be no subvol & files in this location similar
#set tloc [#input to the source file names: ]
[#if ( ([#charfind tloc 1 $] = 1) AND ([#charfind tloc 1 .] <= 0 ))
|then| #set done 1
|else| #output !!!! Bad input !!!!
]
164 RESTORE