From owner-freebsd-questions@FreeBSD.ORG Thu Jun 12 20:03:14 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5D3D106567D for ; Thu, 12 Jun 2008 20:03:14 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from ozzie.tundraware.com (ozzie.tundraware.com [75.145.138.73]) by mx1.freebsd.org (Postfix) with ESMTP id 5D13B8FC16 for ; Thu, 12 Jun 2008 20:03:14 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from [192.168.0.2] (viper.tundraware.com [192.168.0.2]) (authenticated bits=0) by ozzie.tundraware.com (8.14.2/8.14.2) with ESMTP id m5CK38O6092286 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for ; Thu, 12 Jun 2008 15:03:08 -0500 (CDT) (envelope-from tundra@tundraware.com) Message-ID: <485180FA.4060800@tundraware.com> Date: Thu, 12 Jun 2008 15:03:06 -0500 From: Tim Daneliuk Organization: TundraWare Inc. User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: FreeBSD Mailing List References: <48517B1E.5090905@tundraware.com> In-Reply-To: <48517B1E.5090905@tundraware.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-tundraware.com-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: m5CK38O6092286 X-tundraware.com-MailScanner: Found to be clean X-tundraware.com-MailScanner-From: tundra@tundraware.com X-Spam-Status: No Subject: Re: Rsync From FreeBSD To Windows X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2008 20:03:14 -0000 Tim Daneliuk wrote: > I have an smbfs share that mounts at boot time on a 6.3-STABLE system. > I want to rsync from a FreeBSD directory to the Windows share. For > reasons I seem to not be able to discover, rsync insists on copying > every file, every time. The exact command is: > > rsync -va /FreeBSD-dir-tree /windows-mount > > I have tried -O -no-p without success. > > I'm guessing this is a problem mapping the filesystem semantics from > FreeBSD to SMB so that rsync always thinks the files on the > destination SMB share are out of date, but I cannot seem to find the > right magic to overcome this. > > > Ideas? (And TIA), Inevitably, as soon as I posted this, I finally discovered the problem, which is worth describing here to save other people the same suffering: 1) The problem occurs when the SMB mount is a FAT formatted drive. In this case, it was a USB drive plugged into the WinXP machine being used as removable backup medium. 2) The problem occurs because the FAT file entry has insufficient resolution to maintain exactly the same timestamp as FreeBSD. i.e., FreeBSD (and I presume Linux or other Unix variants) have a finer timestamp resolution than does FAT. 3) The fix is to tell rsync to not be so fussy about exact timestamp matches: rsync -va --modify-window=1 src dest 4) This assumes that the FreeBSD server and the Windows machine hosting the share are more-or-less synchronized to the correct absolute time. If they are not, the --modify-window= parameter may have to be larger to accommodate the difference in what each machine thinks the "correct time" is. -- ---------------------------------------------------------------------------- Tim Daneliuk tundra@tundraware.com PGP Key: http://www.tundraware.com/PGP/