From owner-freebsd-questions@FreeBSD.ORG Tue Jul 15 08:48:13 2003 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 80D8D37B404 for ; Tue, 15 Jul 2003 08:48:13 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E00943FF7 for ; Tue, 15 Jul 2003 08:48:11 -0700 (PDT) (envelope-from jan.muenther@nruns.com) Received: from [212.227.126.203] (helo=mrvnet.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 19cS25-0002jt-00; Tue, 15 Jul 2003 17:48:01 +0200 Received: from [172.23.4.131] (helo=config4.kundenserver.de) by mrvnet.kundenserver.de with esmtp (Exim 3.35 #1) id 19cS24-0001Ey-00; Tue, 15 Jul 2003 17:48:00 +0200 Received: from www-data by config4.kundenserver.de with local (Exim 3.35 #1 (Debian)) id 19cS25-0004Yc-00; Tue, 15 Jul 2003 17:48:01 +0200 To: peo@intersonic.se From: Message-Id: <6445542$10582835003f141fecbae881.58177731@config4.schlund.de> X-Binford: 6100 (more power) X-Originating-From: 6445542 X-Mailer: Kundenserver.de Webmail X-Received: from config4.schlund.de by 53.122.192.14 with HTTP id 6445542 for peo@intersonic.se; Tue, 15 Jul 2003 17:48:01 +0200 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 Date: Tue, 15 Jul 2003 17:48:01 +0200 cc: freebsd-questions@freebsd.org Subject: Re: scp+find, a little help please 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: Tue, 15 Jul 2003 15:48:13 -0000 Hi there, > Need to set up scp to copy only newer files and directories between two > computers. > > The basic setup is like: > scp -pr user@host1:" host2:/dir > > What would be a suitable "find command" here? Erm, newer than *what*? find needs a file as a comparison parameter to detetermine whether another file is newer than it or not. I assume you mean you want to copy only files from host1 to host2 which exist on both machines, with host1 potentially holding newer versions that should get synchronized to host2. Before you break your neck with (absolutely well possible) scripting solutions, I suggest you have a look at rsync, which uses SSH for transport by default now as well. Or maybe check out rdiff-backup, of which a port has just been submitted (AFAIK) if a backup is what you're after: http://rdiff-backup.stanford.edu/ Cheers, Jan