From owner-freebsd-questions@FreeBSD.ORG Mon Jan 19 18:07:24 2009 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 8E2E51065674 for ; Mon, 19 Jan 2009 18:07:24 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: from mail6.sea5.speakeasy.net (mail6.sea5.speakeasy.net [69.17.117.8]) by mx1.freebsd.org (Postfix) with ESMTP id 64BF58FC14 for ; Mon, 19 Jan 2009 18:07:24 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: (qmail 19972 invoked from network); 19 Jan 2009 18:07:23 -0000 Received: from april.chuckr.org (HELO april.telenix.org) (chuckr@[66.92.151.30]) (envelope-sender ) by mail6.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 19 Jan 2009 18:07:23 -0000 Message-ID: <4974BF93.4080000@telenix.org> Date: Mon, 19 Jan 2009 12:59:47 -0500 From: Chuck Robey User-Agent: Thunderbird 2.0.0.6 (X11/20071107) MIME-Version: 1.0 To: Roland Smith References: <4974B9A2.4070709@optiksecurite.com> <20090119174619.GA43749@slackbox.xs4all.nl> In-Reply-To: <20090119174619.GA43749@slackbox.xs4all.nl> X-Enigmail-Version: 0.95.5 OpenPGP: id=F3DCA0E9; url=http://pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD , freebsd-questions@freebsd.org Subject: Re: Advice for dump/restore over SSH 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: Mon, 19 Jan 2009 18:07:25 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Roland Smith wrote: > On Mon, Jan 19, 2009 at 12:34:26PM -0500, FreeBSD wrote: >> My question is how do you clone PC over SSH (it would be too much a PITA >> to open each case to plug the HD directly in the source PC). > > Would it have to be ssh? Why not just use netcat [nc(1)] if both > machines are on your local network? > > Try something like: > > > newfs /dev/foo > mount /dev/foo /mntroot > cd /mntroot > nc -l 65000| restore -rvf - > > > dump -0 -a -C 8 -L -u -f - / | nc 65000 > > Roland Your answer is perfectly correct, but a couple of reasons makes me want to point up a tried & true tool like rsync. It'll do what the man wants while using ssh to cover security, give really nice running feedback (if the user likes that sort of thing, I do), and because it's basically a lot less general a tool than netcat, it's a bunch simpler for an occaisonal user to figure out the parameters on ... it's made precisely for this sort of job. Of course, it happens to be true that, if you are going to really spend the time to learn one of them, your time'd probably be better spent with netcat, it's got many more things it can do, but like I said, for an occaisonal user, well, I wouldn't have recommended that. Of course, a not terribly big shell script could make nc look like rsync. Reverse isn't true. Just wanted to offer a simpler option. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkl0v5MACgkQz62J6PPcoOlZdACfXxFS+7SclI6Il/6fXYOgd6Vl JsYAn2MhB/5x9VH4JvnVwxWsDHi8SF4N =jKWP -----END PGP SIGNATURE-----