Backing up selective sub directories...and dir and include

Robert Haskins <rhaskins-X6DOoJyBSnRWk0Htik3J/[email protected]> Tue, 31 Aug 2004 15:28:22 -0400
Newsgroups gmane.comp.sysutils.backup.hdup.general
Message-ID <[email protected]>
First off, hdup is an excellent backup utility. It sems to do just about 
everything we need it to do! My initial testing went well, where I 
backed up a number of remote hosts to a central host. Static 
directories, no include/excludes, works perfectly. Very simple to setup, 
low overhead, creates tar files easily extractable.

However, during the next stage rollout, we want to be able to allow 
users to place files in a subdirectory of their home directory to be 
backed up, without backing up the entire contents of /home or even 
/home/<user>.

An example of such a directory to back up would be /home/rhaskins/bak. 
We want to backup only the files in /home/rhaskins/bak without having to 
specify all users via the "dir" directive. Essentially, we want to back 
up "/home/*/bak/". An "ls /home/*/bak" returns the proper list of files 
to be backed up.

I have attempted several ways of doing this, but the "include" directive 
pattern seems to require files globs, and doesn't seem to allow 
directory globs. At least, I haven't been able to figure out how. 
Looking at the code, and the find command, it seems to wants have file 
globs.

One way we thought of doing this was by using symlinks from a directory 
we are backing up (/var/bak) to each user's backup directory 
(/home/rhaskins/bak). Then, tell tar to backup the actual files pointed 
to by the symlinks, rather than symlinks (which is the tar default). 
However, there doesn't seem to be any way to pass tar options from hdup.

Has anyone solved this problem? Any ideas on how to accomplish this? 
Thanks very much for your time.