I'm trying to find someone with experience or documentation for the use of pattern matching in samba's smbclient when using its tar (-T) exclude and include options. My objective is to write an smbclient wrapper that would allow multiple items to be excluded via an file containing a list of patterns. I had my first significant success last evening, but can not use wildcard patterns. Each excluded file must be specifically listed. For seven samba shares, here was my total "STRANGE" report last evening. Normally it seems to be more than a page.
FAILURE AND STRANGE DUMP SUMMARY: butch //tec/C lev 0 STRANGE ... /-- butch //tec/C lev 0 STRANGE sendbackup: start [butch://tec/C level 0] sendbackup: info BACKUP=/usr/sfw/bin/smbclient sendbackup: info RECOVER_CMD=/usr/sfw/bin/smbclient -f... - sendbackup: info end ? NT_STATUS_SHARING_VIOLATION opening remote file \WINNT\Temp\JET7D2A.tmp (\WINNT\Temp\) ? NT_STATUS_SHARING_VIOLATION opening remote file \WINNT\Temp\JETAEF6.tmp (\WINNT\Temp\) | tar: dumped 26444 files and directories | Total bytes written: 1827618304 sendbackup: size 1784784 sendbackup: end \-------- BTW the comments in amanda.conf regarding exclude and samba are not up to date. # exclude - specify files and directories to be excluded from the dump. # Useful with gnutar only; silently ignored by dump and samba. In fact you can do a single file exclude. But you can't do a list or an append (in my experience). My smbclient wrapper checks if this "excluded file" is in fact a file on the samba host rather than the client. If it is a file on the host, it is assumed to contain a list of files to be excluded. BTW2, the smbclient man page does indicate it can do Includes as well as Excludes. For fans of this feature, perhaps it can be incorporated into amanda backups using smbclient in the future. Maybe it already is, but I've not checked and if so, the comments are similarly out of date. Back to my inability to use patterns; The smbclient man page says to do an exclude on tar file creation you can do -TcX options. Further, it says adding an "r" (-TcXr) will let the files names to be patterns, either regular expressions or simple wildcards depending on smbclient compile options. Whenever I try to add the "r" option, even to an smbclient command line that excludes files properly with no wild cards, I get a message like "tar_re set on" but nothing at all is excluded, even things that were without the "r". FWIW, my samba install is the one supplied with Solaris 9, a version 2.2.???. I've looked for docs beyond the man page that describe the feature but have found nothing, and no example command lines. I looked for samba mailing lists and found either non-English lists :( or ones that in the last 500 messages or so did not even mention smbclient. Anyone care to share their experience using smbclient (or I guess smbtar) with the combination of "X" and "r" options? -- Jon H. LaBadie [EMAIL PROTECTED] JG Computing 4455 Province Line Road (609) 252-0159 Princeton, NJ 08540-4322 (609) 683-7220 (fax)