Bug 4734 - smbclient: tarmode excludes don't work
smbclient: tarmode excludes don't work
Status: RESOLVED INVALID
Product: Samba 3.0
Classification: Unclassified
Component: Client Tools
3.0.25a
Other Linux
: P3 normal
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
http://bugs.debian.org/373850
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-23 06:45 UTC by Debian samba package maintainers (PUBLIC MAILING LIST)
Modified: 2012-05-07 19:07 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Debian samba package maintainers (PUBLIC MAILING LIST) 2007-06-23 06:45:54 UTC
Hello,

a forwarded bug:

"excluding directories during tarmode transfer does not work.

The following example command line was generated by backuppc:

/usr/bin/smbclient \\\\host\\share -U user -E -N -d 1 \
    -c tarmode\ full -TcrX - NOBACKUP

Here 'NOBACKUP' is the directory I want to exclude from the backup - but
I couldn't find any syntax that would actually exclude the NOBACKUP
directory. Tried with 'NOBACKUP', '/NOBACKUP', 'NOBACKUP/',
'/NOBACKUP/', 'nobackup', ...
"

I can reproduce this using this:

smbclient //localhost/noel -U noel -d2 -c tarmode\ full -TXcr backup.tar NOBACKUPDIR

The NOBACKUPDIR is included in the backup.tar.

smbclient(1) says in the tar examples:

             Restore everything except users/docs

             smbclient //mypc/myshare "" -N -TXx backup.tar users/docs

So it should work AFAIK.

thx.

noel@d.o
Comment 1 Michael 2007-12-14 01:24:53 UTC
run as:
/usr/bin/smbclient \\\\host\\share -U user -E -N -d 128 \
    -c tarmode\ full -TcrX - NOBACKUP
See in log
...
Excl: strlen(cur_dir) = 1
...tar_re_search: 1
ms_fnmatch(NOBACKUP,\NOBACKUP) -> 18

run as:
/usr/bin/smbclient \\\\host\\share -U user -E -N -d 128 \
    -c tarmode\ full -TcrX - \NOBACKUP
...
Excl: strlen(cur_dir) = 1
...tar_re_search: 1
ms_fnmatch(NOBACKUP,\NOBACKUP) -> 18

run as:
/usr/bin/smbclient \\\\host\\share -U user -E -N -d 128 \
    -c tarmode\ full -TcrX - \\NOBACKUP
...
Excl: strlen(cur_dir) = 1
...tar_re_search: 1
ms_fnmatch(\NOBACKUP,\NOBACKUP) -> 0
Skipping file \NOBACKUP

Now Ok
Use \\NOBACKUP

Michael



Comment 2 Debian samba package maintainers (PUBLIC MAILING LIST) 2012-05-07 19:07:11 UTC
Last comment gives the answer. When creating an archive, the excluded directory name should be absolute wrt the toplevel directory :

/usr/bin/smbclient \\\\host\\share -U user -E -N -d 1 \
    -c tarmode\ full -TcrX - /NOBACKUP

Hence, closing this bug as invalid