[SunHELP] FW: tar copy/extract redirected over ssh, still need help
Wed Sep 25 16:19:31 CDT 2002
first I needed to adjust my execution method, by doin:
SOURCE_DIR=/test
if [ cd ${SOURCE_DIR} ]; then
/usr/local/bin/tar -cpzvf - ./ | \
ssh ${DEST_HOST} '/usr/local/bin/tar -x -C /test -pzvf -'
fi
I found out that using ${DEST_DIR}, $DEST_DIR or any variable
after the -C switch will cause the tar process to fail. Does
anyone know a way that I can pass a variable after -C? What's
happening now is it stops Authentication successful. If I
hard code a directory then it will work.
-----Original Message-----
From: Markham, Richard
Sent: Wednesday, September 25, 2002 4:09 PM
To: Sunhelp (E-mail)
Subject: tar copy/extract redirected over ssh
I created a test script to tar off a directory to a remote box
using ssh with key authentication:
---snip---
#! /bin/ksh
SOURCE_DIR=/test
DEST_DIR=/test
DEST_HOST=testbox
/usr/local/bin/tar -cpzvf - ${SOURCE_DIR} | \
ssh ${DEST_HOST} '/usr/local/bin/tar -x -C ${DEST_DIR} -pzvf -'
---snip---
then ran the script......
/usr/local/bin/tar: Removing leading `/' from member names
test/file1
test/file2
test/file3
Authentication successful.
/usr/local/bin/tar: This does not look like a tar archive
/usr/local/bin/tar: Skipping to next header
then tar exits....any ideas?
More information about the SunHELP
mailing list