From owner-freebsd-questions@FreeBSD.ORG Sun Mar 14 22:17:12 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7625D16A4D0 for ; Sun, 14 Mar 2004 22:17:12 -0800 (PST) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id C609E43D3F for ; Sun, 14 Mar 2004 22:17:11 -0800 (PST) (envelope-from freebsd-questions@m.gmane.org) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1B2lPS-0007HD-00 for ; Mon, 15 Mar 2004 07:17:10 +0100 Received: from 213-203-244-156.kunde.vdserver.de ([213.203.244.156]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Mar 2004 07:17:10 +0100 Received: from kai by 213-203-244-156.kunde.vdserver.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Mar 2004 07:17:10 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Kai Grossjohann Date: Mon, 15 Mar 2004 07:17:07 +0100 Lines: 45 Message-ID: <87znaid47w.fsf@emptyhost.emptydomain.de> References: <4054B6A3.7080704@stevenfettig.com> <20040314201032.GA72170@alexis.mi.celestial.com> <200403152037.13184.satimis@icare.com.hk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 213-203-244-156.kunde.vdserver.de User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:1ZuG0cWed7tVOWaUl5N/kkAg3w4= Sender: news Subject: Re: Two-way Sync of Directories - how? (rsync?) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2004 06:17:12 -0000 Stephen Liu writes: > On Monday 15 March 2004 04:10, Bill Campbell wrote: > >> I would do this with two rsync runs from one machine >> >> cd $directory >> rsync -e ssh -vaurP ./ $remote:$directory >> rsync -e ssh -vaurP $remote:$directory/ . > > Hi Bill, > > Is the option > -P --partial -- progress > means 'incremental' ??? "-P" is the same as specifying both "--partial" and "--progress". "--progress" means to show a progress meter. Normally, if you interrupt rsync while it is transferring a file, rsync will delete the partially transferred file. If you give the "--partial" option, it will not do that. The advantage of specifying "--partial" is that you can interrupt it in the midst of transferring a 1G file, and then you can resume the transfer later. > What will be difference between > './ $remote:$directory' and '$remote:$directory/' This question does not make sense. You should ask for the difference between './ $remote:$directory' and '$remote:$directory/ .'; note the trailing period. If you say "rsync a b" then this means copy from a to b, if you say "rsync b a", then this means copy from b to a. In the above case, "a" was "." and "b" was "$remote:$directory" ... Explaining the trailing slash is more difficult. I just remember a rule of thumb: if you want to copy directories with rsync, always specify a trailing slash. On both the source and the destination. Of course, "man rsync" has the full story... Kai