I am trying to create a one line command that will:
1. Find all files ending in .conf
2. tar these over ssh to a remote server.
I have reached this point in my trials.
a. I can find the files.
b. I can tar them locally.
c. I can get a simple fileset tar'ed to a remote server over ssh
using tar -zvcf - /some/fileset | ssh host.domain.tld "cat >
/backup/tarfile.tar.gz
d. I cannot get tar to pipe find'ed files to the remote server over
ssh.
My current command line looks like this.
find / -name "*.conf" | xargs -t tar -zcvf - | ssh \
hostname.domain.tld \
"cat > /var/spool/lvm_backups/hostname.city/confs.$(date
+'%Y%m%d').tar.gz"
I have tried replacing "tar -zcvf -" with "tar -zcvf - {}" and "tar -
zcvf {}" to no avail. The problem is that tar does not see the pipe
to ssh and exits with signal 13. What am I missing?
Regards,
Jim
--
*** e-mail is NOT a secure channel ***
James B. Byrne mailto:ByrneJB.<token>@Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3CE delivery <token> = hal