From owner-freebsd-questions@FreeBSD.ORG Fri Jun 20 01:12:57 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 353A27DC for ; Fri, 20 Jun 2014 01:12:57 +0000 (UTC) Received: from mail-yh0-x22a.google.com (mail-yh0-x22a.google.com [IPv6:2607:f8b0:4002:c01::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E991B2E43 for ; Fri, 20 Jun 2014 01:12:56 +0000 (UTC) Received: by mail-yh0-f42.google.com with SMTP id i57so2365280yha.29 for ; Thu, 19 Jun 2014 18:12:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=r0DkGmz/tRDPhLB1JziSPIhqTgQRyt969sShK5INFo4=; b=g5jcZNjDQvoNBVPS8B4wp7PuzEWzSjOB6B1AIICP3zjViSsYtR72zo4Ueg/dVMgqB5 i+Egt39W1P/FHh3mnotUdgU/NnzQq3xOYDXdb99mz9LvgZUgLtk+3PdKCvM8IOabcYy6 CXqfUaaYD8Z6flxbT87tHzNdEm+9S8JuT82heWNueKAMt7wZHfQ6iyghItmhyo2Ref48 BTGfRuBJF5tij25WldMEg/+g3/XjChlSbDUYTJGKgYZOueYt1pOFGyyiGrTpJOTqdJ1k 3oWrn/r8hP6eGGPzKV/pAnTooVRS92OUhULKT7nv99sJJl4aJJjkSfAQkWi43t/kZHPX eCVQ== X-Received: by 10.236.140.16 with SMTP id d16mr208082yhj.55.1403226776005; Thu, 19 Jun 2014 18:12:56 -0700 (PDT) Received: from [192.168.5.145] (adsl-98-87-95-236.bna.bellsouth.net. [98.87.95.236]) by mx.google.com with ESMTPSA id n68sm11845569yhe.23.2014.06.19.18.12.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Jun 2014 18:12:55 -0700 (PDT) Message-ID: <53A38A96.2000903@gmail.com> Date: Thu, 19 Jun 2014 20:12:54 -0500 From: Noel User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Dale Scott , freebsd-questions@freebsd.org Subject: Re: samba, rsync --backup, and mangled instead of long filenames References: <489659738.13024627.1403216558777.JavaMail.root@cds005> In-Reply-To: <489659738.13024627.1403216558777.JavaMail.root@cds005> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 01:12:57 -0000 On 6/19/2014 5:22 PM, 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? Yes, the colons will break windows compatibility. The easy fix is don't use colons, as in date +%FT%H%M%S or maybe --suffix=`date +%FT%H%M%S`.dwg will work. -- Noel Jones > > Background - I'm using rsync and cron to nightly synchronize a local directory on an fbsd server with a Windows server share containing AutoCAD dwg files (among others). I'm using the rsync "--backup" option to preserve historical copies of files because the Windows users can arbitrarily modify files in their share (e.g. by updating a drawing from rev 1 to rev 2, overwriting the v1 file). Even if I could convince users to append the version to the filename, it could never be guaranteed. > > My rsync command line: > > rsync -aq --itemize-changes --include-from=rsync_mech_include --exclude-from=rsync_mech_exclude --backup --suffix=-`date +%FT%T` --log-file="/tmp/rsync.log" "/mnt/share/AutoCAD/16000-16999/" /home/samba/mech/parts.rsync/10016000 > > 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. > > Ideally, I'd rather have backup filenames like 10016342-2014-06-10-T-18-15-19.dwg so they sort nicer and, because the extension is preserved, can be opened (read-only) from a Windows client. However, that's out of scope for --suffix. I could append ".dwg" in the suffix, but I have to deal with essentially arbitrary file extensions, and disassembling and reassembling file names on the fly simply seems like a bad idea, especially if a more out-of-box solution exists. > > Any suggestions? > > Dale > ---- > Transparency with Trust > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"