Reputation: 3380
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?
Upvotes: 1
Views: 105
Reputation: 15057
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.
Upvotes: 0