Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jan 2009 12:59:47 -0500
From:      Chuck Robey <chuckr@telenix.org>
To:        Roland Smith <rsmith@xs4all.nl>
Cc:        FreeBSD <freebsd@optiksecurite.com>, freebsd-questions@freebsd.org
Subject:   Re: Advice for dump/restore over SSH
Message-ID:  <4974BF93.4080000@telenix.org>
In-Reply-To: <20090119174619.GA43749@slackbox.xs4all.nl>
References:  <4974B9A2.4070709@optiksecurite.com> <20090119174619.GA43749@slackbox.xs4all.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
-----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:
> 
> <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.
-----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-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4974BF93.4080000>