SUMMARY:   ufsrestore from unknown tape number and unknown tape position

From: Angel Alejandro Vega Soto <alejandro.vega_at_tecinfocon.com.mx>
Date: Wed Jul 02 2003 - 20:26:59 EDT
Many thaks to  Sal Serafino and Rachid who said

Hi Alejendro,

If I understand well what you need , you want to restore a file from a
tape that you can't identify.
As you did on your ufsdump commands I think it won't be possible to
specify the right tape.
For future dump you must add the "a" option that generates an archive
file that stores a table of contents of the whole dump and enables user
to determine the correspondant  tape.
For instance : /usr/sbin/ufsdump 0lfa  /dev/rmt/0n  <file>
/dev/md/rdsk/d1



Rachid.

who said , quote 


ufsrestore (and vxrestore?) takes the l switch for autoloading tapes
from a  stacker.  If you know it is in file13 on tape4, and that file13
overruns from  tape4 onto tape5, you should be able to do this:

mt -f /dev/rmt/0n asf 13        # Move to file 13 on tape, no rewind
ufsrestore ivlf /dev/rmt/0n     # Interactive, Verbose, Load-next



Due time restrictions I have to make calculations based on how much data
was recorded on each tape and take the position on individual tape.
For change beetween tapes t load it and the unloaded, and because the
stacker mode of the robot loaded the next automatically.


The original question is posted below 

         Hello managers, I have a requirement that I dont know how to
do.
>
> I recently adquired the remote administration of a 5500 machine which
> has connected a L280 autoloader and several A5X00 arrays.
>
> Each sunday a complete dump is made from every filesystem (Volume) in
> the machine its generated by this script.
>
> #!/bin/ksh
> cat /etc/vfstab | /usr/xpg4/bin/grep ufs | /usr/xpg4/bin/grep -v '^#'
| /usr/xpg4/bin/grep -v '^fd' | /usr/xpg4/bin/grep -v 'swap' |
/usr/xpg4/bin/grep -v '^/proc' | /usr/xpg4/bin/awk '{
printf("/usr/sbin/ufsdump 0lf /dev/rmt/0n %s \n /bin/sleep 5 \n",$2);}'
> cat /etc/vfstab | /usr/xpg4/bin/grep vxfs | /usr/xpg4/bin/grep -v '^#'
| /usr/xpg4/bin/grep -v '^fd' | /usr/xpg4/bin/grep -v 'swap' |
/usr/xpg4/bin/grep -v '^/proc' | /usr/xpg4/bin/awk '{
printf("/usr/sbin/vxdump 0lf /dev/rmt/0n %s \n /bin/sleep 5 \n",$2);}'
>
> which creates a file like this
>
> /usr/sbin/ufsdump 0lf /dev/rmt/0n /dev/md/rdsk/d1
>  /bin/sleep 5
> /usr/sbin/ufsdump 0lf /dev/rmt/0n /dev/md/rdsk/d20
>  /bin/sleep 5
> /usr/sbin/ufsdump 0lf /dev/rmt/0n /dev/md/rdsk/d30
>  /bin/sleep 5
> /usr/sbin/ufsdump 0lf /dev/rmt/0n /dev/md/rdsk/d40
>  /bin/sleep 5
> /usr/sbin/ufsdump 0lf /dev/rmt/0n /dev/rdsk/c4t1d0s0
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-01/vol01dm
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-01/vol02dm
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-01/vol03dm
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-01/vol04dm
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-01/vol05dm
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-01/vol06dm
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-01/vol07dm
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-01/vol08dm
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-02/volem01
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-02/volem02
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-02/volem03
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-02/volem04
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-02/volem05
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-02/volem06
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-02/volem07
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-02/volem08
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-03/volop01
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-03/volop02
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-03/volop03
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-03/volop04
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-03/volop05
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-03/volop06
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-03/volop07
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-03/volop08
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-01/vol09dm
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-01/vol10dm
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-01/vol11dm
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-01/vol12dm
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-02/volem09
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-02/volem10
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-02/volem11
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-02/volem12
>  /bin/sleep 5
> /usr/sbin/vxdump 0lf /dev/rmt/0n /dev/vx/rdsk/group-02/vol13dm
>  /bin/sleep 5
>
> which is executed every saturday via crontab.
>
> now the l options on the ufsdumps and vxdumps is there for that when a
tape automatically
> ends and more space is required put that offline and reload the next
in the stack, right ?
>
> now I want to restore ONE uniq file of one which is in ONE of this FS,
due the changes of sizes in some of them
> the tape that can be varies, can be the 4th or 5th tape, ok ?
>
> I know I can move between tape positions with mt command, but how do I
move beetween tapes, Remeber I do the administration remotely.
>
> Please, any ideas , Its very important I restore this file.
-- 
Angel Alejandro Vega Soto <alejandro.vega@tecinfocon.com.mx>
Tecnologia Informatica y Consultoria
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Wed Jul 2 20:26:53 2003

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:15 EST