rbthomas@athos.rutgers.edu (Rick Thomas) (10/03/89)
I recently downloaded "backup" and tried it. I have the following comments. 1) It does not preserve file mod dates or permissions. It should. It would be easy to make it do so. The code to do the job exists in cpdir.c This feature should probably be hung off of an option. I suggest "-p". 2) If you specify the "-z" option and a file has a name that is 13 or 14 characters, it creates an empty backup file with as much of the ".Z" appended to its name as will fit. (Try using "backup -z" on the "amoeba/kernel" directory. The file "etherformat.h" will demonstrate the problem.) The cause of this malfunction is complex. First, "compress" does not return a non-zero error code for the "filename too long to tack on .Z" error, though it does issue a diagnostic. Second, the "-c" option (which "backup" uses when it calls "compress") should make "compress" not care about the length of the file name at all. It is just writing to standard out. Third, even if compress did return an error code for "filename too long", "backup" would just silently delete the output file and continue without backing up that file. Probably not what the user wanted. One possible fix here would be to correct the second ("-c" option) problem in "compress", and then have "backup" use the unmodified file name as the output. This leaves to the user the problem of keeping track of whether the files on a backup disk are compressed. 3) If you use it to back up a large file system that requires multiple output floppys, and then use it to do an incremental backup later on, anything that does not go on the first floppy in the original backup will get backed up again whether it needs it or not. This makes "backup" unusable for backing up anything that is close to a full floppy. I know the comments at the beginning say that it is not intended to be used in backing up whole file systems, just medium sized (and not too deep) directory trees, but it would be nice to have it do the "right thing" if you did try to use it that way. In order to fix this, one way would be to keep a "table of contents" file on the first floppy of a series. 4) Floppy swapping by forking a shell and asking the user to do it for you is "gag me with a spoon!" kludgey. One way to do it right would be to have the "-m" option require the second "directory" argument to actually be a floppy device (eg "/dev/at0") upon which backup can "mount" each volume in sequence. The mount point could be created specially for the purpose in "/tmp". If I feel inspired some time soon, I may try to fix these problems, and post the changes. Don't hold your breath... Uncommitted time is hard to come by around here. Rick -- Rick Thomas uucp: {ames, att, harvard}!rutgers!jove.rutgers.edu!rbthomas internet: rbthomas@JOVE.RUTGERS.EDU bitnet: rbthomas@zodiac.bitnet Phone: (201) 932-4301