i am running a cron job, that calls a sh script with the code bellow. I have noticed that sometimes it works, but sometimes i am getting a 0KB file. I have no idea what could be causing this 0KB or what could be done to fix this.
DATE=`date +%Y-%m-%d-%H-%m` NAME=bkp-server-207-$DATE.sql.gz mysqldump -u root -pXXXX@2016 xxxx | gzip > /media/backup_folder/$NAME
$?) returned as nonzero.