slevy@poincare.geom.umn.edu (Stuart Levy) (02/07/91)
I'm trying to make a full bru filesystem backup, but excluding a few directories like /tmp, /usr/tmp, /usr/adm/crash, etc. It's easy with GNU tar, but I'd like to make the tape be directly readable from the recovery system. It's tempting to try find / /usr -mount -print | egrep -v ... | bru ... - but bru's man page suggests this won't work -- 'find' will find all directories *and* all files, and bru will traverse all the directories it's given, so everything will be backed up >= 2 times. A better approximation could be find / /usr -mount -type d -o -print | egrep -v ... | bru ... - This gets all files, sym links, &c exactly once, and bru promises to archive the directories that contain them. But directories that happen to be empty at the time -- /usr/spool/mqueue, /usr/preserve, filesystem mount points etc. -- won't be re-created when the archive is restored. Neither will the excluded directories. Has anyone come up with a good way to get bru to do this? Thanks in advance... Stuart Levy, Geometry Group, University of Minnesota slevy@geom.umn.edu