
		ARCHIVE/UNARCHIVE COMMANDS EXECUTED BY USERS 

The following commands are located in /usr/tools.  Only archive, unarchive
and archlist can be directly invoked by the user.


COMMAND			DESCRIPTION

archive		This UNIX shell program	moves the files specified by the user
		to the appropriate directory for archiving.  Before it does
		this however, it checks to see that the user has not previously
		requested files by the same name to be archived.  If there are 
		files with identifical names, this program will ask the user if
		he/she wants to overlay the current files or if he/she wants to
		rename the files to be archived. Archive will then move the
		named file(s) to the appropriate directory for archiving.  If
		the user enters 'archive ?' the archive program calls archlist
		and lists the files that the user currently has in archives.

archexpire 	This C program expires files in the archtable by changing
		the retention field to 'X'.  It is setuid to the owner
		of the archtable (usually root).  Currently used by the
		Advantage! Toolbox tool to delete archived files.

archlist	This UNIX shell program displays the names of a user's archived
		files.  It may be called by the archive or unarchive commands
		when those commands are given '?' as an argument.  It may also
		be invoked at the shell prompt.  If the -v option is given,
		it will call the program long and will produce a longer
		listing.

ymd		This program converts the character format of a date
		(dd-mmm-yyyy) to a numeric format (yymmdd).  This is
		called by the archive program.

long    	This UNIX shell program displays the archive date, retention
		status and the filenames of archived files for the user.  This
		program is called by archlist is the user has given -v as an
		argument to the archlist command.

short    	This UNIX shell program displays the names of archived files
		for a specific user.  It is called by archlist if the user has
		not given any arguments to the archlist command.

unarch.get	This UNIX shell program moves unarchived files from the user's
		.unarchive directories to their target directory.  This is
		by the unarchive command.

unarch.list	This UNIX shell program lists the files that have been 
		retrieved from the archives and placed under the user's
		.unarchive directories.  This is called by the unarchive
		program when the user includes '?' as an argument to the 
		unarchive command.

		ARCHIVE/UNARCHIVE COMMANDS EXECUTED BY USERS 	      page 2


unarch.log 	This C program updates files in the /unarchive directory
		that are used to store users' unarchive requests.  It is 
		called by the unarchive command.  It is setuid to the owner
		of the files in /unarchive (usually root).

unarch.rqst	This UNIX shell program notifies the system of files that a
		user wants to have unarchived by updating various files in
		the /unarchive directory.  This is called by the unarchive
		command.

unarchive 	Without arguments, this UNIX shell program retrieves unarchived 
		files and puts them in the user's home directory. When an
		unarchived file has the same name as an existing file, the user
		is prompted to give the existing file a new name. The unarchived
		file is then moved to to the user's home directory.  The user
		may specify a different directory than $HOME by including the
		name of the directory as an argument to the unarchive command.

		With arguments, unarchive verifies that the requested files
		exist and are archived. This command will make a list of the
		requested files and will place this list in the appropriate
		directory for the actual unarchiving process. If the user
		enters 'unarchive ?' the unarchive program will call archlist
		and will list the files that the user currently has in archives.



   ARCHIVE/UNARCHIVE COMMANDS EXECUTED BY SYSTEM ADMINISTRATORS    page 3

The following commands can be executed when logged on as "root".  They
are all located in /etc.

arch.nite	This UNIX shell program	starts the archiving process. The
		system administrator must be root when executing this program.

ck.disk		This UNIX shell program finds the total amount of disk space
		used up by files stored under $HOME/.archive directories. When
		this reaches 10 megabytes, the system administrator is sent a
		message that an archive needs to be done. This is executed by
		the crontab file once a day.

cnvdate		This utility program is used to convert dates back and
		forth from YYMMDD to DD-MMM-YY.

dmy		This program is used by long to convert dates back
		yymmdd format to dd-mmm-yy format.  If called with the
		-f option it takes a filename as an argument.  Otherwise,
		it attempts to convert its argument or stdin to the
		dd-mmm-yy format.

mk.sysadm	This UNIX shell program	establishes who is to receive messages
		requesting files to be unarchived. Usually this would be the
		system administrator.  Make.sysadm is initially executed by root
		after the archive programs have been installed.  Execute this
		program again anytime a new system administrator has been named.

mv.files	This UNIX shell program builds an executable shell script to
		move unarchived files from the /unarchive directory to a user's
		$HOME/.unarchive date directories.  This program is called by
		unarch.tape.

table.edit	This sed script adds a new flags field to /usr/adm/archtable.
		The default for this flags field is "N" for "Not Specified".
		The system administrator should execute this program only if
		there is a /usr/adm/archtable existing before these archive/
		unarchive programs are installed. This program is used only
		once.

today		This program converts the numeric version of a date
		(yymmdd) to a character format (dd-mmm-yy).  It is
		called by the unarch.tape program.

unarch.ck	This UNIX shell program checks to see if any users have
		requested files to be unarchived. If so, a message is sent to
		the system administrator.  This program is executed by crontab
		every two hours during the work day.



   ARCHIVE/UNARCHIVE COMMANDS EXECUTED BY SYSTEM ADMINISTRATORS    page 4


unarch.nite	This UNIX shell program	starts the unarchiving process.  The
		system administrator must be root when executing this program.
		Unarch.nite makes a list of the tape volids needed for the
		unarchiving session.  It calls a second program, unarch.tape
		which performs the actual retrieval from tape.

unarch.tape	This UNIX shell program tars off the specified files and puts
		them in the /unarchive directory.  It then moves them to the
		user's .unarchive directory and sends the user a message telling
		him/her how to retrieve the unarchived files. Unarch.tape is
		called by unarch.nite and is not a command entered by the
		system administrator.

ymd		This program converts the character format of a date
		(dd-mmm-yyyy) to a numeric format (yymmdd).  It is
		called by the unarch.tape program.  This program is
		also used once by the system adminstrator to convert
		the date format in the archtable from dd-mmm-yyyy to
		yymmdd.  It takes a -f argument to specify a file.
		Otherwise it attempts to convert its argument or 
		stdin  to the yymmdd format.




		ARCHIVE/UNARCHIVE PROGRAMS ADMINISTRATIVE FILES		page 5

archnote	This is a brief note sent by the ck.disk program to the
		system administrator suggesting that an archive be run in the
		near future to free up disk space. This file is in /usr/adm.

archtable	This is a table of all the files that have been archived.
		It is in /usr/adm and contains the following fields:
		volid, retention flag, date archived, full pathname of file.
		This file is updated by the arch.nite program.

login_names	This file is a list of login names of users who have requested
		files to be unarchived.  This file is in /unarchive and is
		updated 1) whenever a user requests a file to be unarchived
		(unarchive command) and 2) whenever files are actually
		retrieved from tape (unarch.tape program).

unarch.msg	This is a brief note sent by the unarch.tape program to users
		who have had files unarchived. This message is in /usr/adm.

unarchive.note	This is a brief note sent by the unarch.ck program to the
		system administrator telling him/her that a user has requested
		a file to be unarchived.  This file is in /usr/adm.



		NOTES TO THE SYSTEM ADMINISTRATOR			page 6


	One purpose of archiving files is to maximize your disk usage by 
	copying infrequently-used files to tape and then deleting these same
	files from disk.  The files can be retrieved from tape when needed.
	Users should be aware that they should archive only those files that
	they do not use frequently but that they want for future use or
	reference.

	The system administrator should set aside a number of tapes that are
	reserved for archiving purposes only.  These tapes should be used
	for one archive, labeled with the date of the archive and kept.
	Remember, if the tape is reused, the files that were originally there
	would be overwritten.

	The system administrator should be the person responsible for archiving
	and unarchiving files.  He/she can decide how frequently archives should
	be taken.  This package includes a program that calculates the amount
	of disk space taken by files to be archived.  When it reaches a certain	
	limit, the system administrator will receive a message suggesting that
	an archive be taken; however, archives may be taken more frequently if 
	desired.  It is a good idea for the system administrator to decide on
	a date he/she will do the archive, and then put a message on the motd
	to that effect.  This message can remind the users that they should
	clean out their directories and archive files they do not use very
	often.

	Users archive their files by giving the command 'archive <filename>'.
	They may request that files be unarchived by giving the command
	'unarchive <filename>'. These two commands are explained more 
	thoroughly in man pages.  To see these pages, type 'man archive' or
	'man unarchive'.

	The system administrator archives the files by issuing the 'arch.nite'
	command as root. The system administrator unarchives files by issuing
	the 'unarch.nite' command as root.

