Re: Using hdup 2.0.0

Miek Gieben <[email protected]> Mon, 15 Nov 2004 12:02:44 +0100
Newsgroups gmane.comp.sysutils.backup.hdup.general
Message-ID <[email protected]>
[On 11 Nov, @ 17:50, Boris wrote in "Re: [hdup-user] Using hdup 2.0 ..."]
> The / at the end is only very slightly special - it causes a "Now
> Leaving" message to be output with the -VV flag. Without the trailing /
> there is no message but the directory is still excluded, which confused
> me the first few times through.  (And of course without the trailing /
> you could catch a non-directory file of the same name, but that follows
> from the "just match against the pathname" rule, if you imagine all
> directories being written with their trailing / when they're compared
> against the regexp).

to answer this question and to get some documentation about it online.
(which I can then copy into the manual page :-) )

A trailing slash '/' on a pattern means that a pattern is only applied
to directories.

Regarding your statement about directories are still excluded. Because
of the way tar works I cannot include directories in the filelist.
Whenever tar sees a directory it will backup _all_ files in that dir,
regardless of any exclude directives you might have in hdup's conf
file. Which clearly is not what you want.

So to trick tar into doing what hdup wants, it generates a list of
_files_ and feeds that to tar. This file generation can be influenced 
by the nobackup/include/exclude keywords. So when excluding a
directory with exclude actually means the following:
hdup will traverse the tree and will _not_ put any files of the
excluded directory (nor files from subdirs) into the filelist. The
actually pathname of the directory itself is never put into that list.

Then tar scans the list and looks at the --listed-incremental file to 
decide wether to put the file in the actual tar archive.

If this actually makes sense, I can release hdup2.0.1 :-)

grtz Miek