Subject: y2k & GNU tar (was: How to back up from one hard disk to another...
To: Robert Kennedy , <netbsd-help@netbsd.org>
From: Richard Rauch <rauch@rice.edu>
List: netbsd-help
Date: 11/26/2001 06:34:53
Re. the date-string-parsing problems, check out the NetBSD Problem Report
#9287 at:

 http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=9287

(I thought that I'd filed a similar pr with tar or find, but can't find
it, now.  Maybe I'm imagining things..?)

As for your second problem (files being retroactively dated via touch(1)),
you might use some kind of fingerprint/digest to see if the file is really
the same, and ignore the datestamps.  This could be as simple as checking
for a _different_ (not necessarily newer) datestamp, as well as different
filesize---or you could get something like an MD5 fingerprint or CRC...
(In fact, there is floating around somewhere a program called crc (I saw
it on the Amiga, but it was a UNIXish type of program); it would
fingerprint every file in the named director(y|ies) and write a file
containing the results---or if the fingerprint file already existed, it
would list the files that had a different CRC than was recorded
previously.)

Another approach would be to mirror the philsophy of a dump(1)
configuration: Periodically, backup everything regardless of the file date
or last backup.  If you do this fairly regularly, and don't very often
have back-dated files, this should take care of the problem.  (As I
understand it, dump(1) is usually (necessarily?) configured to have
different backup levels according to the date; periodically, it starts
over and backs up everything; at intermediate points, it can be configured
to backup things that haven't been backed up in N days.)

Also, not to second guess you, but it seems to me that back-dated files
tend to come out of systems like pkgsrc.  Do you really need to worry
about backing up any such things?  (Certainly, in the case of pkgsrc, I'd
not bother: In the event of a lost system, I'd just install a fresh pkgsrc
and the desired packages---though a list of packages to (re)install would
be a helpful thing.  (^&)


  ``I probably don't know what I'm talking about.'' --rauch@math.rice.edu