view tape content written by ufsdump? - SUN
This is a discussion on view tape content written by ufsdump? - SUN ; Hi, I might have confused a few tapes so I want to list their content
or date information of files generated on the tapes
This is the command that dump files to the tape daily:
ufsdump ${LEVEL}lufc $DEVICE /partitionname
I ...
-
view tape content written by ufsdump?
Hi, I might have confused a few tapes so I want to list their content
or date information of files generated on the tapes
This is the command that dump files to the tape daily:
ufsdump ${LEVEL}lufc $DEVICE /partitionname
I used tar tvf and cpio -civt and they both failed! I suppose it's
because the tape is written by ufsdump and can only be read by
ufsrestore.
Is there anyway to view what is actually on the tape? Date of the
content being written is enough, any ideas appreciates.
Below is the failed attemps:
# tar tvf /dev/rmt/1n
tar: tape read error
/usr/bin/mt -f /dev/rmt/1n status
Inf of my tape drive:
sense key(0x0)= No Additional Sense residual= 0 retries= 0
file no= 1 block no= 0
# mt -f /dev/rmt/1n rewind
# /usr/bin/mt -f /dev/rmt/1n status
Quantum DLT8000 tape drive:
sense key(0x0)= No Additional Sense residual= 0 retries= 0
file no= 0 block no= 0
# cpio -civt < /dev/rmt/1n
cpio: I/O error on "input", errno 12, Not enough space
1 errors
# tar tvf /dev/rmt/1n
tar: tape read error
-
Re: view tape content written by ufsdump?
Chris wrote:
> Hi, I might have confused a few tapes so I want to list their content
> or date information of files generated on the tapes
>
> This is the command that dump files to the tape daily:
>
> ufsdump ${LEVEL}lufc $DEVICE /partitionname
>
>
> I used tar tvf and cpio -civt and they both failed! I suppose it's
> because the tape is written by ufsdump and can only be read by
> ufsrestore.
>
> Is there anyway to view what is actually on the tape? Date of the
> content being written is enough, any ideas appreciates.
>
man ufsrestore
It SAYS that there is a way to list the files. I've never succeeded in
getting it to work but it's a place to start.
-
Re: view tape content written by ufsdump?
Chris wrote:
> Hi, I might have confused a few tapes so I want to list their content
> or date information of files generated on the tapes
>
> This is the command that dump files to the tape daily:
>
> ufsdump ${LEVEL}lufc $DEVICE /partitionname
>
>
> I used tar tvf and cpio -civt and they both failed! I suppose it's
> because the tape is written by ufsdump and can only be read by
> ufsrestore.
That's because it doesn't write in either "cpio" or "tar"
formats, it has it's own.
If I remember correctly, both "tar" and "cpio" write the
file name/info as they write the file to tape (or tar/cpio archive
file).
"ufsdump" writes the list of files it's going to put in the archive
at the beginning, saving time if the file you want isn't on this
tape/file.
> Is there anyway to view what is actually on the tape? Date of the
> content being written is enough, any ideas appreciates.
ufsrestore tvf
You can leave out the "v" in "tvf", it justs displays more verbose
info like when the archive was created which is one of the things
you are looking for.
Works great, been using this for years and never had any problems
with it listing the files from a tape or ufsdump file..
-
Barry Keeney
Chaos Consulting
email barryk@chaoscon.com
"Rap is Square Dancing gone terribly, terribly Wrong...."
-
Re: view tape content written by ufsdump?
On Apr 24, 5:41 am, Chris wrote:
> Hi, I might have confused a few tapes so I want to list their content
> or date information of files generated on the tapes
>
> This is the command that dump files to the tape daily:
>
> ufsdump ${LEVEL}lufc $DEVICE /partitionname
>
> I used tar tvf and cpio -civt and they both failed! I suppose it's
> because the tape is written by ufsdump and can only be read by
> ufsrestore.
>
> Is there anyway to view what is actually on the tape? Date of the
> content being written is enough, any ideas appreciates.
>
> Below is the failed attemps:
>
> # tar tvf /dev/rmt/1n
> tar: tape read error
>
> /usr/bin/mt -f /dev/rmt/1n status
> Inf of my tape drive:
> sense key(0x0)= No Additional Sense residual= 0 retries= 0
> file no= 1 block no= 0
>
> # mt -f /dev/rmt/1n rewind
>
> # /usr/bin/mt -f /dev/rmt/1n status
> Quantum DLT8000 tape drive:
> sense key(0x0)= No Additional Sense residual= 0 retries= 0
> file no= 0 block no= 0
> # cpio -civt < /dev/rmt/1n
> cpio: I/O error on "input", errno 12, Not enough space
> 1 errors
>
> # tar tvf /dev/rmt/1n
> tar: tape read error
Since you wrote the tape with ufsdump, then the appropriate tool to
extract the contents is ufsrestore. Since all you want to do is
determine what each of the tapes contains then simply change to /tmp
and then do a ufsrestore -ivf /dev/rmt/1n will get an interactive
restore. Once it reads the table of contents you use cd and ls to
change directories and list the contents of the directories. Further
the ufsrestore -ivf /dev/rmt/1n will give a date and time that the
ufsdump occurred on
-
Re: view tape content written by ufsdump?
On Apr 24, 6:41 am, Chris wrote:
> Hi, I might have confused a few tapes so I want to list their content
> or date information of files generated on the tapes
>
> This is the command that dump files to the tape daily:
>
> ufsdump ${LEVEL}lufc $DEVICE /partitionname
>
> I used tar tvf and cpio -civt and they both failed! I suppose it's
> because the tape is written by ufsdump and can only be read by
> ufsrestore.
>
> Is there anyway to view what is actually on the tape? Date of the
> content being written is enough, any ideas appreciates.
>
> Below is the failed attemps:
>
> # tar tvf /dev/rmt/1n
> tar: tape read error
>
> /usr/bin/mt -f /dev/rmt/1n status
> Inf of my tape drive:
> sense key(0x0)= No Additional Sense residual= 0 retries= 0
> file no= 1 block no= 0
>
> # mt -f /dev/rmt/1n rewind
>
> # /usr/bin/mt -f /dev/rmt/1n status
> Quantum DLT8000 tape drive:
> sense key(0x0)= No Additional Sense residual= 0 retries= 0
> file no= 0 block no= 0
> # cpio -civt < /dev/rmt/1n
> cpio: I/O error on "input", errno 12, Not enough space
> 1 errors
>
> # tar tvf /dev/rmt/1n
> tar: tape read error
ufsrestore tf /dev/rmt/1n
The t means "show me the table of contents." The f means "use this
device/file", in your case /dev/rmt/1. I'm not sure how to get the
date of the archive, but when you restore the files, ufsrestore will
preserve the original modification time by default (if possible).
-b