Darn it! I hate it when I screw up my own example. Please forgive me, but
the example I gave below was *WRONG*. Details inline.
On Mon, 12 Feb 2001, Mikkel L. Ellertson wrote:
> On Mon, 12 Feb 2001, Charles Galpin wrote:
> > You need to use /dev/nst0 consistantly (including during the
> > restore). Try this
> >
> > tar cvbf 20 /dev/nst0 ./home
> > tar cvbf 20 /dev/nst0 ./var
> > tar cvbf 20 /dev/nst0 ./etc
> >
> > mt -f /dev/st0 rewind
> > tar tf /dev/nst0
> >
> > mt -f /dev/st0 fsf 1
> > tar tf /dev/nst0
> >
> > mt -f /dev/st0 fsf 1
> > tar tf /dev/nst0
err, I didn't use nst0 on the fsf lines. doh! Try this instead
tar cvbf 20 /dev/nst0 ./home
tar cvbf 20 /dev/nst0 ./var
tar cvbf 20 /dev/nst0 ./etc
mt -f /dev/st0 rewind
tar tf /dev/nst0
mt -f /dev/nst0 fsf 1
tar tf /dev/nst0
mt -f /dev/nst0 fsf 1
tar tf /dev/nst0
and you will see your archives. See below for an easy to see test example
(much faster to try than the above)
> I alway thought that using /dev/st0 only did a rewind after you closed
> the connection, not when you opened it. I am going to have to play with
> this and double check, if it does a rewind when you open the connection,
> then the docs are wrong, or there is a bug in the st code.
This is correct. I did the following test to verify this, and make sure I
didn't screw up my example again :)
[root@rabbit /root]# cd /tmp
[root@rabbit /tmp]# mkdir test
[root@rabbit /tmp]# cd test
[root@rabbit test]# touch archive1 archive2 archive3
[root@rabbit test]# mt -f /dev/st0 erase # clean slate
[root@rabbit test]# tar cf /dev/nst0 archive1 # create first archive
[root@rabbit test]# tar cf /dev/nst0 archive2 # second
[root@rabbit test]# tar cf /dev/nst0 archive3 # and third
[root@rabbit test]# tar tf /dev/st0 # OK Mikkel, no rewind first
[root@rabbit test]# tar tf /dev/st0 # but sure is now :)
archive1 # found first archive
[root@rabbit test]# mt -f /dev/st0 fsf 1 # try skip over first
[root@rabbit test]# tar tf /dev/st0 # let's see what's there
archive1 # OOPS, not using non-rewinding
[root@rabbit test]# mt -f /dev/nst0 fsf 1 # ok, skip over first
[root@rabbit test]# tar tf /dev/nst0 # let's see what's there
archive2 # excellent
[root@rabbit test]# mt -f /dev/nst0 fsf 1 # skip over second
[root@rabbit test]# tar tf /dev/nst0 # again, list contents
archive3 # whoohoo! sanity!
> Mikkel
charles
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list