On Fri, Dec 15, 2000 at 11:35:42AM +0200, Hannes Niemi wrote:
>
> Hi,
>
> It is the basic unix what is the problem in our case
>
> This is a simple e.g.
> ls | ssh sampo "cat > test.ls"
>
> I make ls in my current directory and the output is directed to
> host called sampo and again to file named test.ls from standard input.
>
> Then in case of tar this should be something like
>
> tar cf - * | ssh hostname "cat > /my/tar/directory/tarfile.tar"
I took this and did some experiments on Red Hat 7.0 using OpenSSH to add
compression. I think these should work on any version of SSH.
To compress on the machine originating the backup:
root@charlesc # tar -cf - directory.to.be.tarred | bzip2 | ssh server "cat >
test.tar.bz2"
To compress on the target:
root@charlesc # tar -cf - directory.to.be.tarred | ssh server "bzip2 > test.tar.bz2"
where server is the name of the target computer.
Normally I would compress on the originating machine, to minimize traffic
over the net, always a major consideration. However, if the originating
machine is an older, slower machine, it may be considerably faster to
compress on the target.
I'm ging to add this to my writeup on bare metal backup and restore and
also to my writeup on SSH.
One comment on Hannes' command line, though. I would rather back up a
directory (including its contents) than the contents alone. That way I can
unpack it anywhere, and have a logical unit with the original directory
name. But that's a nit pick.
--
-- C^2
No windows were crashed in the making of this email.
Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley
PGP signature