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