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: - dir/ - f/ - a - b - c - d 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: http://article.gmane.org/gmane.network.samba.internals/70835 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.