Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jan 2009 12:59:47 -0500
From:      Chuck Robey <>
To:        Roland Smith <>
Cc:        FreeBSD <>,
Subject:   Re: Advice for dump/restore over SSH
Message-ID:  <>
In-Reply-To: <>
References:  <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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:
> <destination machine, booted e.g. from CD>
> newfs /dev/foo
> mount /dev/foo /mntroot
> cd /mntroot
> nc -l 65000| restore -rvf -
> <source machine>
> dump -0 -a -C 8 -L -u -f - / | nc <dest> 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.
Version: GnuPG v2.0.9 (FreeBSD)
Comment: Using GnuPG with Mozilla -


Want to link to this message? Use this URL: <>