简体   繁体   中英

What does innobackupex put into its standard out?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM