NAME

	bru -- backup and restore utility

SYNOPSIS

	bru  mode  [control options]  [selection options]  [files]

MODE

	-c         create a new archive with specified files
	-d         find differences between archived files and current files
	-e         estimate media requirements for create mode
	-g         give only information from archive header
	-h         print this help information
	-i         inspect archive for consistency and data integrity
	-t         list archive table of contents for files
	-x         extract named files from archive

CONTROL OPTIONS

	Sizes are specified in bytes.  The scale factors 'G' or 'g',
	'M' or 'm', 'K' or 'k', or 'B' or 'b' can be appended to the size
	to indicate Gigabytes, Megabytes, Kilobytes, or Blocks (2048 bytes).

	-a         reset file access times after reads 
	-b N       set archive buffer size to N bytes (scalable)
	-B         background mode, no interaction with operator
	-C         always chown extracted files to the user's uid/gid
	-D         on some systems, provides speedup via double buffering
	-f file    use specified file as archive ('-' for stdin/stdout)
	-F         fast mode, no checksum computations or checking
	-G	   Create an archive contents listing (directory) that can 
		   then be read without scanning the entire tape.  Use -gg to 
                   read this contents file.
	-I option  an interaction option:
	           l,pathname  write verbosity info to pathname
	           q,fifo      write interaction queries to fifo
	           r,fifo      read interaction replies from fifo
		   b	sets up default brutab fifos to communicate with
			brutalk.  -Ib is equivalent to:
		        -Iq,/dev/bru.q -Ir,/dev/bru.r
	-L str (c) In create mode, label tape with given string 
		   (63 char max).
	-L file	   In create mode, the first 63 characters in file are used
		   as the label for the archive members.  In extract mode
		   the first 63 characters within file are used for the
		   comparison as described below.
	-L str (x) In extract mode, only restore if the label of the 
		   archive EXACTLY matches the given string.  If the string
		   does not match on the initial tape, the operation 
		   aborts.  If the label does not match on subsequent
		   tapes, a warning is issued, but the extraction
		   continues.
	-l         suppress warnings about unresolved links
	-m         limit directory expansions to same mounted filesystem
	-N nbits   use nbits for LZW compression (default 16); see -Z
	-p         pass over archive files by reading rather than seeking
	-P opts    special options for pathname handling and expansions
	           a    turn off absolute to relative pathname conversion
	           A    turn on absolute to relative pathname conversion
	           e    turn off expansion of directories
	           E    turn on expansion of directories
	           f    turn off filter mode (build internal file tree)
	           F    turn on filter mode (do not build internal tree)
	           p    turn off auto archiving of parent directory nodes
	           P    turn on auto archiving of parent directory nodes
	-r rawdev  This enables BRU to backup or restore raw data partitions.  
		   A BRURAW file must exist and contain entries that define
		   the raw data to be accessed.  The file contains entries of
		   the format:
	
		   Raw Device Name	Size	Blk Size  Starting Offset

		   a sample entry would be:
		   /dev/rfd0135ds9	720k	512		0

		   An entry MUST exist in the BRURAW file or bru will abort
		   the operation with an error message.
	-R         exclude remotely mounted files for NFS/RFS systems
	-s N       specify size of archive media (K, M or G can be used to
	           set size in Kilobytes, Megabytes or Gigabytes)
	-S N       turn on options to handle sparse files intelligently
	           and set sparse file size threshold in bytes (scalable)
	-T file	   Translate on restore - rename or relocate files based on
		   the contents of a translation file.  This file contains
		   two columns - all files that contain the text in column 1
		   will have that text translated to the text in column 2.
		   This translation applies to directories, names and 
		   extensions.  Translate works with all BRU modes except
	           create (-c).
	-v         enable verbose mode (-vv and -vvv for more verbosity)
	-V         print execution summary
	-w         display action to be taken and wait for confirmation
	-Z         use LZW compression on archived files; see -N

FILE SELECTION OPTIONS

	-E         do not replace existing files while extracting, this
	           option is ignored for other modes (overridden by -u option)
	-n date    select files by date (newer than date), if the date
	           is preceded by an exclamation point "!" then files
	           older than the specified date will be selected
	           date can be specified as a string or as reference
	           file (mod time of the reference file is used).  by default
	           the modification and create times are used for comparison
	           other times can be used by specifying letters after the
	           date (a-access time, m-mod time, c-create time).
	           EX: "-n 14-Apr-84,15:24:00,ac" or "-n file.ref"
	-o user    select files owned by user, where user may be a symbolic
	           user name, numeric user id, or file owned by user
	-u abcdf   use selected files in given class regardless of
	   lpr     modification dates, where class is one or more of:
	           a    use any file, same as giving all other args
                        (effectively overwrites ANY existing file)
	           b    use block special files
	           c    use character special files
	           d    use directories
	           f    use regular files (same as 'r')
	           l    use symbolic links
	           p    use fifos (named pipes)
	           r    use regular files (same as 'f')
	-U N	   Selection depth for backup or restore of files in relation
		   to the current directory depth.  Files more than (N) levels
		   Under this level will not be processed.
	-X         select files according to include/exclude patterns
	           specified in the BRUXPAT file

ENVIRONMENT/GLOBAL BRUTAB VARIABLES

	The following BRU variables may be defined as environment variables
	or listed in the BRUTAB file.  If they are pecified in the BRUTAB file,
	each parameter must be on a separate line and begin with the character
	sequence "#.".  Note that these are NOT comments.

	#+GLOBALNAME=variable

	Environment variables override the settings in the BRUTAB file.

	SHELL=file      				Default /bin/sh

	This variable points to your command shell.  This shell is used
	when BRU spawns a task for running other tasks such as switching
	tapes in a loader.
	---

	NOFILESINHDRS=[YES|NO]				Default YES

	To reduce the amount of tape required by BRU when writing many
	small files (less than one tape block), BRU now places the
	contents of these small files within the header block when 
	possible.  This reduces the amount of tape required to write a
	given volume and reduces the time required to write to the
	tape device.
	---

	RECYCLEDAYS=N					Default 0

	The days a tape must age before bru will overwrite its contents
	with no warning to the operator.  0 means forever.
	---

	OVERWRITEPROTECT=[YES|NO]			Default YES

	If OVERWRITEPROTECT is enabled (YES), then BRU will read the tape
	label before attempting to write to the tape.  BRU will then compare 
	the value of use the value of the RECYCLEDAYS variable as a comparison 
	against the age of the tape to be written to.  If the age of the tape
	is less than RECYCLEDAYS, an overwrite protect warning will be issued.

	OVERWRITEPROTECT only works with tapes written by BRU.  Also, when 
	used in conjunction with the MAXWRITES variable, OVERWRITEPROTECT
	offers a level of tape management giving you an indication of when
	a specific tape should be removed from rotation.
	---

	BRUTABONLY=[YES|NO]				Default NO

	This tell bru to limit acceptable archive destinations to those 
	listed in the brutab file.  If set to YES, only devices in the brutab
	file will be allowed for write access.  Does not effect reads.  
	---

	DEVNAMECHECK=[YES|NO]				Default NO

	DEVNAMECHECK causes BRU to perform a "sanity check" on the device
	name to prevent the creation of a large file in the /dev directory.
	If BRUTABONLY is YES, then this option serves no purpose.
	---

	MATCHLEVEL=N					Default 2

	MATCHLEVEL determines the level of pathname matching performed by
	bru during a backup or restore operation.  A level of 0 will only
	match the exact pathname entered (i.e.: /tmp/123 will not match
	./tmp/123 or tmp/123, only /tmp/123).  A level of 1 will match
	relative pathnames that mean the same path (i.e.: tmp/123 will
	match itself and ./tmp/123, but not /tmp/123 (unless you are in
	root)).  Level 3 will match any similar pathname (tmp/123 will 
	match /tmp/123, tmp/123 and ./tmp/123).
	---

	MAXFILENAMELEN=N				Default 255

	MAXFILENAMELEN should not be set to a value larger than the legal
	filename length for your filesystem.  Most modern filesystems can
	handle a 255 character name, but many older systems may have a 14
	character filename limit.
	---

	MAXWRITES=N					Default 1000

	This option works in conjunction with OVERWRITEPROTECT and allows
	you to limit the number of times a specific piece of media (tape) 
	can be used before it is recommended for removal from tape rotation.
	Recommendations for various tape types are given below:

	    1/4" DC6000 carts	100
	    4mm DAT		200
	    8mm Exabyte		50 for non-MP, 150 for MP tapes
	    1/2" Reel		250
	    1/2" DLT		250

	While many of these media types are rated to allow for many more 
	passes than the numbers shown above, we believe that your data is 
	too important to stretch tape usage to the maximum values of media 
	manufacturers.
	---

	READCHECKLEVEL=(0|1|2)				Default 1

	On many NFS mounted volumes, it isn't possible for BRU to easily 
	determine if a file is locked.  To prevent excessive read errors
	or a hang condition, BRU will pre-read files to check for a lock
	state.  A 0 means no pre-read, a 1 means pre-read only files that
	appear to be locked and a 2 means to pre-read ALL files (which can
	slow your backup performance).
	---

	ZBUFSIZE=N(b|B|k|K|m|M)				Default 500K

	This is the size of the compression buffer allocated by bru for
	use when compressing or decompressing files.
	---

	BRUHELP=file					Default "/bru/bruhelp"

	This variable points to the location and name of THIS file.
	---

	BRUMAXWARNINGS=N				Default 1000

	This is the maximum number of warnings that bru will report before
	aborting the current operation.
	---

	BRUMAXERRORS=N					Default 500

	This is the maximum number of errors that bru will report before 
	aborting the current operation.
	---

	BRUXPAT=file					Default"/etc/bruxpat"

	This is the name and location of the bru exclusion file.  Paths
	and files listed in this file will be excluded from backup or
	restore if the -X option is placed in the bru command line.
	---

	BRURAW=file					Default "/etc/bruraw"

	This is the name and location of the file containing legal raw data
	partitions to be backed up or restored by bru.  When using the -r
	option on the command line, bru will examine the contents of this
	file before performing the backup or restore operation.  If there is
	no match, bru will abort the operation.
	---

	BRUSMARTREST=file			Default "/etc/brusmartrest"

	This is the name and location of the smart restore file.  Files
	listed in this file will be handled as open and restored using a
	protected method, alleviating the problem of restoring over an
	open file or shared library.
	---

	BRUREMOVELOG=file			Default "/usr/adm/bruremovelog"

	This is the name and location of the results of a smart restore.  In
	the event that a restored file's "text busy" flag was set, we rename
	the original file and then restore the appropriate file.  As a result,
	we create a sh script that will clean up the old, renamed files.  If
	you are creating scripts to run BRU, it is a good idea to exec this
	file as the last stage of any restore that is performed.
	---
	
	BRUTMPDIR=directory				Default "/usr/tmp"

	This is the file that is used for temporary I/O space by bru during
	the creation of the archive directories when using the -G option.
	BRU removes any files it created in this directory after the operation 
	is completed.
	---


