I have some sample code below where i am using tar/dd to backup files to tape...
time tar -cvf - \
/home/user1 \
/home/user2 | dd bs=128k of=/dev/rmt0 2>&1 | tee -a debug.log
mail -s "testing" admin@domain.com < debug.log
The issue is when i run this, the following is printed to screen...
a /home/user1/fileA 10 blocks.
a /home/user2/fileB 1 blocks.
0+1 records in.
0+1 records out.
real 0m2.253s
user 0m0.003s
sys 0m0.002s
But only the following is redirected to the log file...
cat debug.log
0+1 records in.
0+1 records out.
Is there a way to redirect all of the output to the log?
I tried adding the tee command in-between the tar/dd pipe and that did not work.
This is on a system running IBM AIX so i don't have access to many of the GNU tools out there.