I am trying to encrypt our tape backups, using tar and openssl but also write to a local file, so far I have :
tar --total -czp ./tmp ./home | tee /tmp/Archive.tar.gz | tee > /dev/nst0
I'm not sure if this is the correct tee sytax but it works, because
tar -tzvf /dev/nst0
and
tar -tzvf /tmp/Archive.tar.gz
give the correct results.
However if I try to add encryption using openssl :
tar --total -czp ./tmp ./home | openssl aes-256-cbc -e -salt -pass file:/encrp_file | tee /tmp/Archive.tar.gz | tee > /dev/nst0
I get :
tee: standard output: Invalid argument
tee: write error
I assume that there is something in the output from openssl that is causing a problem for tee when it writes to the tape because the file is created properly and if I remove the output to tee and just send it to the tape it also works.
Any suggestions?
teenecessary ? Maybe you can replace it with|tee /tmp/Archive.tar.gz >/dev/nst0– b0fh Nov 9 '11 at 13:06