1

So I was executing the following line of code:

innobackupex --defaults-file=${CONFIG_FILE} --no-timestamp --user=${DB_USER} --password=${DB_PASSWORD} --socket=${DB_SOCKET} ${SLAVE_INFO} --stream=tar ./ &> ${DB_LOG} | gzip - > ${HOSTNAME}_${ENVIRONMENT}_${DATEVALUE}.tar.gz

The "&>" resulted in log files of over 75 GB -- and the output wasn't readable.

I switched this to "2>" and the log file size was manageable and didn't cause my server to run out of space :-)

Can anyone let me know why this behavior was experienced? And why does normal functionality go out to standard error?

user3299633
  • 2,971
  • 3
  • 24
  • 38

1 Answers1

0

if you redirect the out with "&>" to a file you redirect stdout and stderr to the file. In your case you put the innobackupex output and the erroroutput to the file.

So with 2> you redirect only the erroroutput to the file.

Bernd Buffen
  • 14,525
  • 2
  • 24
  • 39
  • I understand the functionality of the command. My question is more of what is the standard output that is being created and why isn't it readable in the log? – user3299633 Jan 24 '16 at 18:15