From: bruce@ais.com (Bruce C. Wright)
Newsgroups: vmsnet.misc
Subject: Re: Rookie Tape Question (was Re: Info-VAX: "Basic" Common Questions)
Date: 26 Sep 92 01:08:26 GMT
Followup-To: vmsnet.misc
Organization: Applied Information Systems, Chapel Hill, NC

In article <1992Sep25.152650.1@ducvax.auburn.edu>, swanger@ducvax.auburn.edu writes:
> Ok, here is my rookie tape question.  How do you copy all of the files in a
> directory structure to an ANSI tape that preserves the subdirectory
> organization?  I have a directory tree with several hundred files and dozens
> of subdirectories.  I want to copy all of this to an ANSI tape with one
> command if possible.  Backup doesn't work.  I read the backup manual and it
> stated that backup only creates savesets when working with tapes (I don't
> want to use savesets on the tape).  I can't get copy to work either.  I am
> missing something here and I would appreciate any help I could get.  Is
> there a simple command?  Do I need to use a command procedure?

The short answer is that what you are trying to do can't be done.

An ANSI tape _by definition_ is a single-directory structure;  it can't
have any subdirectory information.  If you want to preserve subdirectory
information, you have two choices:

    1.	Adopt some naming convention for the file names that you can use
	to map between names on the tape and directories on the disk.  In
	the case of VMS, you might make the restriction that directory
	and file names couldn't include a "-" character, and make up new
	names on the tape that separate the subdirectory names with "-"s.
	Thus [directory.sub]my.file would become directory-sub-my.file.
	This is a certain amount of trouble to deal with and would
	probably only be worthwhile if you were trying to interchange with
	a computer system that did not understand any of the methods
	outlined in section 2.

    2.	Use one or another of the "archive" mechanisms, of which BACKUP
	savesets are one example.  These place files in an archive which in
	turn is stored as a single file on the tape;  the archive has all
	of the information to restore the individual files and their
	directory information. 	Other archival software available for VMS
	includes various DECUS/Usenet/VMSNET utilities such as ZOO,
	ZIP/UNZIP, TAR, etc.  ZIP/UNZIP is similar to the popular PC
	archival programs;  TAR is similar to the Unix tar.

It would help to know what you are trying to accomplish (besides getting
the files on the tape, that is ... what do you plan to do with them after
you get them there?).  Why doesn't BACKUP work?  That's the easiest way
to transfer files between VMS systems, and it really isn't very hard to
use.  Are you trying to read the tape under Unix?  In that case you would
probably want to look at tar, although you should be aware that not all
file types transfer nicely between VMS and Unix.  (There are a couple of
programs floating around that will read BACKUP savesets under Unix, but
it would usually be more convenient to use tar).  Are you trying to
trade tapes with a system that doesn't understand any of the common
archival formats?  In that case you may be stuck with method #1.  If your
objection to savesets or archives is philosophical rather than practical,
then I suspect you will have to lump it and go with what works.

Sorry if this isn't very helpful, but I'd have to know what you plan to
do with your tape once you've written it before it would be worth going
into much more detail.

Bruce C. Wright