Actually a part of "Stupid SSH Tricks", don't use scp.
dd if=/dev/dasda1 bs=4096 | ssh -l bkupuser boxname "dd bs=4096
of=/dev/tape1"
Heck:
cd /home ; find . -xdev -print | cpio -ocB | ssh -l yada boxname
"cd /backups/home ; cpio -icdmBv"
-soup
--------------------
John R. Campbell, Speaker to Machines (GNUrd) {813-356|697}-5322
Adsumo ergo raptus sum
IBM Certified: IBM AIX 4.3 System Administration, System Support
"Fargusson.Alan"
<[EMAIL PROTECTED] To: [EMAIL PROTECTED]
tb.ca.gov> cc:
Sent by: Linux on Subject: Re: [LINUX-390] Is there a
way to get "scp" to read STDIN?
390 Port
<[EMAIL PROTECTED]
IST.EDU>
09/04/2003 01:42
PM
Please respond to
Linux on 390 Port
I don't have access to a Linux system to try this, but what happens if you
do:
dd if=/dev/dasda1 bs=4096 | scp /dev/fd/0 [EMAIL PROTECTED]://dev/tape1
-----Original Message-----
From: McKown, John [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 10:19 AM
To: [EMAIL PROTECTED]
Subject: Is there a way to get "scp" to read STDIN?
I want to do something like:
program | scp - [EMAIL PROTECTED]:/output.file
Where scp is used to send the STDOUT of "program" to ~user/output.file on
"host". Apparently scp does not accept input from STDIN. If your really,
really curious about exactly what I want to do:
dd if=/dev/dasda1 bs=4096 | scp - [EMAIL PROTECTED]://dev/tape1
to do a "backup" type function. In even greater detail, I want to copy the
Debian/390 partition on /dev/dasda1 to my Linux/Intel machine. Debian/390
is
running under Hercules/390 on that Linux/Intel box. From what I can tell,
this will create a file on the Linux/Intel machine which I can then
transport, via a USB external hard drive, to my PC at work. Once there, I
will use "ftp" to transfer the data to my OS/390 system (to a tape device).
I will then create a new volume on OS/390 which "looks like" a Linux CDL
volume. I will use IEBGENER to copy the contents of the tape to the DSN
LINUX.VVOLSER.PART0001.NATIVE (RECFM=FBS,LRECL=4096,BLKSIZE=4096). From
everything that I can tell, this *should* result in a partition which is
readable on my SuSE Linux system on the z800.
Goal: To create a Debian/390 system under Linux/Intel at home, then
"transport" that Linux system to the z800 and run it under z/VM. Why not do
it all at work, you ask? I don't have the time to dedicate to it. But I can
do this easily at home. Also, when I'm at home, I don't have any "are you
finished, yet?" type questions. They don't even know that I'm working on
this. Yes, Linux on the z800 is authorized. But no funds or time is
budgetted. So I won't get in any particular trouble. The "joys" of being
the
senior MVS-z/VM-zLinux sysprog are almost unbearable <sardonic grin>.
--
John McKown
Senior Systems Programmer
UICI Insurance Center
Applications & Solutions Team
+1.817.255.3225
This message (including any attachments) contains confidential information
intended for a specific individual and purpose, and its' content is
protected by law. If you are not the intended recipient, you should delete
this message and are hereby notified that any disclosure, copying, or
distribution of this transmission, or taking any action based on it, is
strictly prohibited.