* [gentoo-user] Getting at archives on tapes
@ 2006-02-06 3:40 Brett I. Holcomb
2006-02-06 4:36 ` Richard Fish
0 siblings, 1 reply; 7+ messages in thread
From: Brett I. Holcomb @ 2006-02-06 3:40 UTC (permalink / raw
To: gentoo-user
I have a scsi tape library and a backup program that creates datasets of tar
files on the tapes. I gather each dataset is a tar file. I would like to be
able to access each of these tar files. At this point I can tar
-tvf /dev/tape0 and see the file that contains the tape label. But I can't
get beyond that. I've tried skipping to the next file, records, set mark
using mt with no luck.
Any tips on how to do this?
Thanks.
--
Brett I. Holcomb
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Getting at archives on tapes
2006-02-06 3:40 [gentoo-user] Getting at archives on tapes Brett I. Holcomb
@ 2006-02-06 4:36 ` Richard Fish
2006-02-06 6:12 ` Brett I. Holcomb
0 siblings, 1 reply; 7+ messages in thread
From: Richard Fish @ 2006-02-06 4:36 UTC (permalink / raw
To: gentoo-user
On 2/5/06, Brett I. Holcomb <brettholcomb@bellsouth.net> wrote:
> I have a scsi tape library and a backup program that creates datasets of tar
> files on the tapes. I gather each dataset is a tar file. I would like to be
> able to access each of these tar files. At this point I can tar
> -tvf /dev/tape0 and see the file that contains the tape label. But I can't
> get beyond that. I've tried skipping to the next file, records, set mark
> using mt with no luck.
mt is the correct command, but you need to make sure you are using a
no-rewind tape device (ntape or nst0). Otherwise you will end up
seeking to the next file, closing the file descriptor, which causes
the driver to rewind the tape.
-Richard
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Getting at archives on tapes
2006-02-06 4:36 ` Richard Fish
@ 2006-02-06 6:12 ` Brett I. Holcomb
2006-02-07 15:20 ` Richard Fish
0 siblings, 1 reply; 7+ messages in thread
From: Brett I. Holcomb @ 2006-02-06 6:12 UTC (permalink / raw
To: gentoo-user
Okay, I think I figured out what they are doing. They have a bunch of files
for the labels. If I move forward using asf n where n is a number from 1-n I
can walk through the label files. They take two files/label file so I go
from 1 to 3 to 5 ....
How do I get to this file to untar it? What I have is this when I do tar
-tvf /dev/tape0n.
-rw-rw---- 0/0 1994 2004-11-20 20:56:25 /tmp/fs_95.lbl
Thanks.
On Sunday February 5 2006 23:36, Richard Fish wrote:
> On 2/5/06, Brett I. Holcomb <brettholcomb@bellsouth.net> wrote:
> > I have a scsi tape library and a backup program that creates datasets of
> > tar files on the tapes. I gather each dataset is a tar file. I would
> > like to be able to access each of these tar files. At this point I can
> > tar -tvf /dev/tape0 and see the file that contains the tape label. But I
> > can't get beyond that. I've tried skipping to the next file, records,
> > set mark using mt with no luck.
>
> mt is the correct command, but you need to make sure you are using a
> no-rewind tape device (ntape or nst0). Otherwise you will end up
> seeking to the next file, closing the file descriptor, which causes
> the driver to rewind the tape.
>
> -Richard
--
Brett I. Holcomb
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Getting at archives on tapes
2006-02-06 6:12 ` Brett I. Holcomb
@ 2006-02-07 15:20 ` Richard Fish
2006-02-07 23:46 ` Brett I. Holcomb
2006-02-08 2:54 ` Brett I. Holcomb
0 siblings, 2 replies; 7+ messages in thread
From: Richard Fish @ 2006-02-07 15:20 UTC (permalink / raw
To: gentoo-user
On 2/5/06, Brett I. Holcomb <brettholcomb@bellsouth.net> wrote:
> Okay, I think I figured out what they are doing. They have a bunch of files
> for the labels. If I move forward using asf n where n is a number from 1-n I
> can walk through the label files. They take two files/label file so I go
> from 1 to 3 to 5 ....
>
> How do I get to this file to untar it? What I have is this when I do tar
> -tvf /dev/tape0n.
>
> -rw-rw---- 0/0 1994 2004-11-20 20:56:25 /tmp/fs_95.lbl
>
> Thanks.
Sorry for the slow response on this.
It sounds like you don't really know the exact contents of the tapes,
so I think you should do something like:
# dd if=/dev/tape0n of=archive1 bs=10k
# dd if=/dev/tape0n of=archive2 bs=10k
...
# dd if=/dev/tape0n of=archiveN bs=10k
This should give you a dump of all of the data on the tape, and then
you can analyze it in more detail. You might have to fiddle with the
bs= value above though.
For some background info, tape devices generally write file marks
between archives. So as long as you are using the no-rewind tape
device and reading the full archive, you can usually just read them
one after the other. The mt fsf command is mostly useful for skipping
over archives.
However, tape devices are not very consistent. Sometimes if you read
just part of an archive and close it, the tape will automatically move
to the next file mark. Other devices will require an mt fsf command
to get to the next file mark.
The asf command sometimes works, and sometimes doesn't. rewind and
fsf is the safest method.
-Richard
>
>
> On Sunday February 5 2006 23:36, Richard Fish wrote:
> > On 2/5/06, Brett I. Holcomb <brettholcomb@bellsouth.net> wrote:
> > > I have a scsi tape library and a backup program that creates datasets of
> > > tar files on the tapes. I gather each dataset is a tar file. I would
> > > like to be able to access each of these tar files. At this point I can
> > > tar -tvf /dev/tape0 and see the file that contains the tape label. But I
> > > can't get beyond that. I've tried skipping to the next file, records,
> > > set mark using mt with no luck.
> >
> > mt is the correct command, but you need to make sure you are using a
> > no-rewind tape device (ntape or nst0). Otherwise you will end up
> > seeking to the next file, closing the file descriptor, which causes
> > the driver to rewind the tape.
> >
> > -Richard
>
> --
>
> Brett I. Holcomb
> --
> gentoo-user@gentoo.org mailing list
>
>
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Getting at archives on tapes
2006-02-07 15:20 ` Richard Fish
@ 2006-02-07 23:46 ` Brett I. Holcomb
2006-02-08 2:54 ` Brett I. Holcomb
1 sibling, 0 replies; 7+ messages in thread
From: Brett I. Holcomb @ 2006-02-07 23:46 UTC (permalink / raw
To: gentoo-user
I dug up some docs and found the format is
Tape label Fileset label First backupset Filesetlabel second backup set
where each section/filemark begins a tar archive. Tape label is a file in Tar
format that allows the program to identify the tape. Data following tape
label are fileset/backup pairs that contain the data archived from a backup.
If I cat or less the archive file created by the dd you suggested I get some
test info about the fileset in ascii (see below). If I less the archive I
get this info plus what looks like binary data. However, a tar -tvf of the
tape or archive file from dd just gives me the /tmp/tapexx_lbl.
The block size is 240 for the backup program and the tape is set to a
blocksize of 0 for the SCSI tape. mt show this.
SCSI 2 tape drive:
File number=34, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x28 (Exabyte Mammoth-2).
Soft error count since last status=0
General status bits on (81010000):
EOF ONLINE IM_REP_EN
This was designed to be retrieved by standard tar utilties but I guess I'm not
using tar right <G>.
You mentioned changing the dd block size - any suggestions?
/tmp/fs_95.lbl01006600000000000000000000003712101477727110007015
[Fileset Label]
FS_BACKUP_TYPE=4
FS_START_DIR=/
FS_X_COMMAND=-fcbFVSa Library1 240 /usr/bp/lists.dir/sub95.inc
-zSTATION=gandalf -zWHERE=/ -zVERIFY=2
FS_BLOCKSIZE=240
FS_NODE_NAME=gandalf
On Tuesday February 7 2006 10:20, Richard Fish wrote:
> On 2/5/06, Brett I. Holcomb <brettholcomb@bellsouth.net> wrote:
> > Okay, I think I figured out what they are doing. They have a bunch of
> > files for the labels. If I move forward using asf n where n is a number
> > from 1-n I can walk through the label files. They take two files/label
> > file so I go from 1 to 3 to 5 ....
> >
> > How do I get to this file to untar it? What I have is this when I do tar
> > Thanks.
>
> Sorry for the slow response on this.
>
> It sounds like you don't really know the exact contents of the tapes,
> so I think you should do something like:
>
> # dd if=/dev/tape0n of=archive1 bs=10k
> # dd if=/dev/tape0n of=archive2 bs=10k
> ...
> # dd if=/dev/tape0n of=archiveN bs=10k
>
> This should give you a dump of all of the data on the tape, and then
> you can analyze it in more detail. You might have to fiddle with the
> bs= value above though.
>
> For some background info, tape devices generally write file marks
> between archives. So as long as you are using the no-rewind tape
> device and reading the full archive, you can usually just read them
> one after the other. The mt fsf command is mostly useful for skipping
> over archives.
>
> However, tape devices are not very consistent. Sometimes if you read
> just part of an archive and close it, the tape will automatically move
> to the next file mark. Other devices will require an mt fsf command
> to get to the next file mark.
>
> The asf command sometimes works, and sometimes doesn't. rewind and
> fsf is the safest method.
>
> -Richard
>
> > On Sunday February 5 2006 23:36, Richard Fish wrote:
> > > On 2/5/06, Brett I. Holcomb <brettholcomb@bellsouth.net> wrote:
> > > > I have a scsi tape library and a backup program that creates datasets
> > > > of tar files on the tapes. I gather each dataset is a tar file. I
> > > > would like to be able to access each of these tar files. At this
> > > > point I can tar -tvf /dev/tape0 and see the file that contains the
> > > > tape label. But I can't get beyond that. I've tried skipping to the
> > > > next file, records, set mark using mt with no luck.
> > >
> > > mt is the correct command, but you need to make sure you are using a
> > > no-rewind tape device (ntape or nst0). Otherwise you will end up
> > > seeking to the next file, closing the file descriptor, which causes
> > > the driver to rewind the tape.
> > >
> > > -Richard
> >
> > --
> >
> > Brett I. Holcomb
> > --
> > gentoo-user@gentoo.org mailing list
--
Brett I. Holcomb
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Getting at archives on tapes
2006-02-07 15:20 ` Richard Fish
2006-02-07 23:46 ` Brett I. Holcomb
@ 2006-02-08 2:54 ` Brett I. Holcomb
2006-02-08 11:01 ` Hemmann, Volker Armin
1 sibling, 1 reply; 7+ messages in thread
From: Brett I. Holcomb @ 2006-02-08 2:54 UTC (permalink / raw
To: gentoo-user
Got it.
tar -tvb 240 -f /dev/tape0n | more
lists the files. I did some searching and found that the error (cannot
allocate memory) sometimes shows up when the block size is wrong.
For dd
dd -if=/dev/tape0n -of=archive1 bs=240b
did it.
Thanks for the help. I got to delve a little deeper into tar, dd, and the
tape.
On Tuesday February 7 2006 10:20, Richard Fish wrote:
> On 2/5/06, Brett I. Holcomb <brettholcomb@bellsouth.net> wrote:
> > Okay, I think I figured out what they are doing. They have a bunch of
> > files for the labels. If I move forward using asf n where n is a number
> > from 1-n I can walk through the label files. They take two files/label
> > file so I go from 1 to 3 to 5 ....
> >
>
> # dd if=/dev/tape0n of=archive1 bs=10k
> # dd if=/dev/tape0n of=archive2 bs=10k
> ...
> # dd if=/dev/tape0n of=archiveN bs=10k
>
> This should give you a dump of all of the data on the tape, and then
> you can analyze it in more detail. You might have to fiddle with the
> bs= value above though.
>
> For some background info, tape devices generally write file marks
> between archives. So as long as you are using the no-rewind tape
> device and reading the full archive, you can usually just read them
> one after the other. The mt fsf command is mostly useful for skipping
> over archives.
>
> However, tape devices are not very consistent. Sometimes if you read
> just part of an archive and close it, the tape will automatically move
> to the next file mark. Other devices will require an mt fsf command
> to get to the next file mark.
>
> The asf command sometimes works, and sometimes doesn't. rewind and
> fsf is the safest method.
>
> -Richard
>
> > On Sunday February 5 2006 23:36, Richard Fish wrote:
> > > On 2/5/06, Brett I. Holcomb <brettholcomb@bellsouth.net> wrote:
> > > > I have a scsi tape library and a backup program that creates datasets
> > > > of tar files on the tapes. I gather each dataset is a tar file. I
> > > > would like to be able to access each of these tar files. At this
> > > > point I can tar -tvf /dev/tape0 and see the file that contains the
> > > > tape label. But I can't get beyond that. I've tried skipping to the
> > > > next file, records, set mark using mt with no luck.
> > >
> > > mt is the correct command, but you need to make sure you are using a
> > > no-rewind tape device (ntape or nst0). Otherwise you will end up
> > > seeking to the next file, closing the file descriptor, which causes
> > > the driver to rewind the tape.
> > >
> > > -Richard
> >
> > --
> >
> > Brett I. Holcomb
> > --
> > gentoo-user@gentoo.org mailing list
--
Brett I. Holcomb
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Getting at archives on tapes
2006-02-08 2:54 ` Brett I. Holcomb
@ 2006-02-08 11:01 ` Hemmann, Volker Armin
0 siblings, 0 replies; 7+ messages in thread
From: Hemmann, Volker Armin @ 2006-02-08 11:01 UTC (permalink / raw
To: gentoo-user
On Wednesday 08 February 2006 03:54, Brett I. Holcomb wrote:
> Got it.
>
> tar -tvb 240 -f /dev/tape0n | more
>
> lists the files. I did some searching and found that the error (cannot
> allocate memory) sometimes shows up when the block size is wrong.
>
do'h,
that is why I always save the command line, which I used to put something onto
the tape.. ;)
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-02-08 11:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-06 3:40 [gentoo-user] Getting at archives on tapes Brett I. Holcomb
2006-02-06 4:36 ` Richard Fish
2006-02-06 6:12 ` Brett I. Holcomb
2006-02-07 15:20 ` Richard Fish
2006-02-07 23:46 ` Brett I. Holcomb
2006-02-08 2:54 ` Brett I. Holcomb
2006-02-08 11:01 ` Hemmann, Volker Armin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox