Error in Unix/World Xenix column

William E. Davidsen Jr davidsen at steinmetz.steinmetz.UUCP
Thu Feb 18 05:35:31 AEST 1988


I mailed this letter to the editor of the UNIX/WORLD xenix column, but I
want to avoid people being burned by the information in the March 1988
column regarding backups.

~~~~~~~~
The article on backups in the March 1988 issue contained one example
which has several errors, as shown in listing 2. The original uses
	fgrep -v "/tmp//usr/tmp/"
to (presumably) exclude backup of files in /tmp or /usr/tmp. This
should be
	egrep -v "/tmp|/usr/tmp"
to get the effect you desire.

The second error lies in the logic of the bulkhead file. As illustrated,
this will not work reliably if backups must be done on an active system,
as is often needed in a business environment. A file modified after the
'find' command completes, and before the '.lastpartial' is updated will
not be backed up until the next modification or full backup.

To fix this problem, before the first 'find' command, insert the command
	date /etc/.backuptmp
and replace the command 'date > /etc/.lastpartial' with
	mv /etc/.backuptmp /etc/lastpartial

This insures that a file will be backed up at least once, although there
is a window in which it will appear on two backups, which is acceptable. 

-- 
	bill davidsen		(wedu at ge-crd.arpa)
  {uunet | philabs | seismo}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me



More information about the Comp.unix.questions mailing list