From owner-freebsd-questions@FreeBSD.ORG Wed Aug 2 08:16:33 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 88C5816A4DE for ; Wed, 2 Aug 2006 08:16:33 +0000 (UTC) (envelope-from nikolas.britton@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A16D43D67 for ; Wed, 2 Aug 2006 08:16:27 +0000 (GMT) (envelope-from nikolas.britton@gmail.com) Received: by nf-out-0910.google.com with SMTP id n29so569924nfc for ; Wed, 02 Aug 2006 01:16:26 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cJe8fF+FYRw30BzZhgbZMhDkgv5YGpwG4u9j8gSV2rG6rrSzwWLNdj6c8KIajv3+Ghm59CmCSKkcDS0F8+GTTKmC5/NZeGsftHMR1AD0j2oZ5tEHqYkI9/GLAYwE5XiR7QD2sXyZ6QRF/aqbCa6Psdvy3LXnavcU+84UY+E2dns= Received: by 10.78.156.6 with SMTP id d6mr193061hue; Wed, 02 Aug 2006 01:16:26 -0700 (PDT) Received: by 10.78.143.11 with HTTP; Wed, 2 Aug 2006 01:16:26 -0700 (PDT) Message-ID: Date: Wed, 2 Aug 2006 03:16:26 -0500 From: "Nikolas Britton" To: "John Nielsen" In-Reply-To: <200608011431.09443.lists@jnielsen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060801175209.GA24100@skytracker.ca> <20060801140433.f27bb1cb.wmoran@collaborativefusion.com> <200608011431.09443.lists@jnielsen.net> Cc: David Banning , freebsd-questions@freebsd.org Subject: Re: best way to copy from one fbsd box to another 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, 02 Aug 2006 08:16:33 -0000 On 8/1/06, John Nielsen wrote: > On Tuesday 01 August 2006 14:04, Bill Moran wrote: > > In response to David Banning : > > > I am installing a new server and have to copy many files from old server > > > to new. I have connected a windows box to each via samba, and am dragging > > > from one to the other via the windows box. > > > > > > This might seem like a silly question, but what is the way to copy > > > -directly- from one fbsd box to another? > > > > Usually NFS or scp. There are other choices, though. > > For many situations my favorite is tar+netcat (w/ optional bzip2 compression). > > On the destination host: > cd /some/path > nc -l 1234 | tar -xjvf - > > And on the source host: > cd /some/path > tar -cjvf - relative/path/to/source/dir | nc destip 1234 > > If you don't want compression leave out the 'j' flag in both calls to tar. > > scp is your best bet if you need encryption though (take note of the -r and -C > flags). > I'll 2nd netcat... one of the most versatile tool I've come across in UNIX land! http://www.securitydocs.com/library/3376 http://www.rajeevnet.com/hacks_hints/os_clone/os_cloning.html http://www.stearns.org/doc/nc-intro.current.html One thing I'd like to add to Johns comment is to not use compression if your on a GigE network, The overhead required to do this will max out the CPU, the net effect being very slow transfer rates. It also helps to not use tar -v, you will miss error messages if you use -v because the SNR is very low, it consumes CPU time too. -- BSD Podcasts @: http://bsdtalk.blogspot.com/ http://freebsdforall.blogspot.com/