Date: Fri, 20 Jun 2014 06:37:14 +0200 From: Polytropon <freebsd@edvax.de> To: Dale Scott <dalescott@shaw.ca> Cc: freebsd-questions@freebsd.org Subject: Re: samba, rsync --backup, and mangled instead of long filenames Message-ID: <20140620063714.bdfd6d7d.freebsd@edvax.de> In-Reply-To: <489659738.13024627.1403216558777.JavaMail.root@cds005> References: <360406130.12989549.1403213723396.JavaMail.root@cds005> <489659738.13024627.1403216558777.JavaMail.root@cds005>
next in thread | previous in thread | raw e-mail | index | archive | help
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_ > solutions? 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 archive processing. > 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". ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140620063714.bdfd6d7d.freebsd>