The Samba-Bugzilla – Bug 9989
smbclient3 tar exclusion mode doesn't work when used with path to files
Last modified: 2014-09-23 16:11:26 UTC
Created attachment 9013 [details]
output of smbclient with debug level = 5
While writing my test suite for smbclient tarmode I realized that
using the X switch to exclude files (instead of directories) silently
fails. This is inconsistent with the include flag which does include
directory /and/ files.
The man page reads:
X - Exclude files and directories. Causes files to be excluded from
an extract or create. See example below. Filename globbing works in
one of two ways now. See r below.
Lets say the root of my *empty* share has this hierarchy:
If I make a backup excluding dir/f and dir/d, dir/d is still included
in the tar file. However, if I remove the first 'dir' in the hierarchy
the file is correctly excluded.
See post on mailing list:
I've attached the output of smbclient (with a debug level = 5) in the buggy case.
@Aurélien: your new smbclient tarmode implementation passes both create/extract with explicit exclude tests. I don't expect that we'll be backporting your re-write for Samba < 4.2, so I'll close this bug for now. Please reopen if you have any concerns.