samba, rsync --backup, and mangled instead of long filenames
freebsd at edvax.de
Fri Jun 20 04:37:23 UTC 2014
On Thu, 19 Jun 2014 16:22:38 -0600 (MDT), Dale Scott wrote:
> I've got backup files created by rsync in a Samba file share
> being served with mangled filenames to a Windows client. I
> suspect it's because I'm telling rsync to create backup
> filenames with colons in them and, since Windows doesn't
> allow colons in a filename, Samba has no choice but to serve
> mangled filenames. Does that make sense? Are there any _easy_
Preprocess your files with tar: Create a tar archive without
compression, it will preserve the file names. Just make sure
the tar archive itself does not contain "forbidden" characters
or names. :-)
If I understand correctly, you're not going to _use_ the files
on the "Windows" PC, right? In this case, you don't have to
worry about the fact that "Windows" is missing basic means for
> If e.g. file 10016342.dwg is created in the Windows share,
> copied by rsync to the local fbsd directory, then modified
> in the Windows server share, rsync renames the local 10016342.dwg
> to something like 10016342.dwg-2014-06-10T18:15:19 first,
> then copies the updated file.
You could maybe install Cygnwin or Mingw or something like that
on the "Windows" box to postprocess the tar archive after it
has successfully arrived, changing the timestamps with a
replacement command like "sed 's/:/./g'". The archive would
then be extracted and its _content_ can be accessed on "Windows"
too. The replacement run could simply eliminate all "offendig"
characters or strings for _all_ files in the archive.
Of course, you could do this kind of processing _before_ the
rsync run on the FreeBSD machine, which will probably be a lot
easier, and you don't have to involve tar archiving.
So much for interoperability on "Windows". ;-)
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions