From owner-freebsd-questions@FreeBSD.ORG Wed Sep 27 22:04:53 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 659F616A4C2 for ; Wed, 27 Sep 2006 22:04:53 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 906EF43D8B for ; Wed, 27 Sep 2006 22:04:42 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.6/8.13.6) id k8RM4d7i060465; Wed, 27 Sep 2006 17:04:39 -0500 (CDT) (envelope-from dan) Date: Wed, 27 Sep 2006 17:04:39 -0500 From: Dan Nelson To: Paul Schmehl Message-ID: <20060927220439.GC45831@dan.emsphone.com> References: <765A325E54DCF1DC39EBF9AE@utd59514.utdallas.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <765A325E54DCF1DC39EBF9AE@utd59514.utdallas.edu> X-OS: FreeBSD 6.1-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-questions@freebsd.org Subject: Re: Sync files locally? 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: Wed, 27 Sep 2006 22:04:53 -0000 In the last episode (Sep 27), Paul Schmehl said: > What's the best way to sync files locally? > > I'm running rsync over ssh to backup files from a server. Now I'm > setting up a new server, so I rsynced to it as well. The files end > up in a subdir of my home directory, because my account is being used > for the rsync. I've been using cp -R to put them in the right place > on the server and the chmod and chown to get the perms right, but I'm > thinking there has to be a way to sync the files locally so that only > the ones that have changed or are new have to be copied to the right > place. As long as your rsync path has a leading /, it should start at the root filesystem. e.g. "rsync mydir otherserver:mydir" creates ~/mydir , "rsync mydir otherserver:/mydir" creates /mydir (assuming you have permission). > I can use find to set the perms, but I'm not sure how to sync the > files. This is unix, so there's got to be a built-in utility that > does this, but I can't seem to find it. You could use rsync to do this, but It'd probably be easier to get your remote rsync to drop the files in the right directory in the first place. -- Dan Nelson dnelson@allantgroup.com