From owner-freebsd-questions@FreeBSD.ORG Fri Jun 20 04:37:23 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C752CC00 for ; Fri, 20 Jun 2014 04:37:23 +0000 (UTC) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A0B62105 for ; Fri, 20 Jun 2014 04:37:23 +0000 (UTC) Received: from r56.edvax.de (port-92-195-64-166.dynamic.qsc.de [92.195.64.166]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 5514124AAC; Fri, 20 Jun 2014 06:37:15 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s5K4bEpe001973; Fri, 20 Jun 2014 06:37:14 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Fri, 20 Jun 2014 06:37:14 +0200 From: Polytropon To: Dale Scott 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> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 04:37:23 -0000 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, ...