Subject: Re: on-shot tar&ftp
To: None <netbsd-users@NetBSD.org>
From: Mike Parson <email@example.com>
Date: 12/08/2004 16:11:43
On Wed, Dec 08, 2004 at 06:54:01PM +0100, Joel CARNAT wrote:
> I want to send a tarball through FTP "on the fly".
> I can't tar on local machine first (because I boot from CD, got a
> shell and am trying to tar the whole installed / to a backup server), so
> I have to tar and ftp_put on the fly. I saw (while pkg_adding) that you
> can ftp_get and untar on the fly, but how to do the same thing the other way ?
> seen on pkg_add :
> ftp> get xv-3.10anb7.tgz "| ( cd /var/tmp/instmp.15276b ; gunzip 2>/dev/null | tar -vvx -f - | tee /dev/stderr )"
> I tried :
> ftp> " ( tar cf - . | gzip -c - ) " | put me.tar.gz
> ftp> " ( tar cf - . | gzip -c - ) |" put me.tar.gz
How about over ssh instead?
tar -cf - . | gzip -9c - 2>/dev/null | ssh otherhost dd - me.tar.gz