Possible long filenames problem with smbtar
Peter Samuelson
peter at cadcamlab.org
Thu Apr 13 03:27:53 GMT 2000
[David C. M. Bilsby]
> The backup itself seems to run without a problem. When I come to
> restore or list the tar file however, the long filenames get
> truncated. I have tried to list the tar with the SUN tar command and
> also restore it with smbtar and smbclient with no success.
The standard "tar file" format is kind of weird. IIRC, the pathname is
stored in two separate strings, each of which has a max length (99
characters for one of them, I believe). Something like:
more pathname component(s)
pathname component(s) go here and filename go here
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
So to use the absolute maximum length, your pathname must have a
separator in *exactly* the right place.
> The manual for smbtar states a limit of 1024 bytes for the filename
> and pathname. The filenames above do not exceed this limit, the
> number of bytes chopped off is only about 10-15 more.
Hmmmm, I thought the limit was *considerably* lower.
> I would appreciate any suggestions as to why this might be happening.
Well, try this. Create an identical directory tree under Unix (just
one branch will do for the test), and tar it up. See if *that* works.
If so, it's a smbclient bug; if not, it's a limitation of the tarfile
format.
Peter
More information about the samba
mailing list