I'm new on linux user I try to run crontab to backup my database with vagrant user* * * * * /usr/bin/mysqldump -h localhost -u root -p root mydb | gzip > /var/backup/all/database_`date +%Y-%m-%d`.sql.gz >/dev/null 2>&1when the crontab runs there is no backup file in the folder (my backup/all has the permission scheme 755). This is error from /var/log/syslogAug 16 11:55:01 precise64 CRON[2213]: (vagrant) CMD (/usr/bin/mysqldump -h localhost -u root -p root mydb | gzip > /var/backup/all/database_`date +%Y-%m-%d`.sql.gz >/dev/null 2>&1)Aug 16 11:55:01 precise64 CRON[2212]: (CRON) info (No MTA installed, discarding output)So I think it's about crontab can't create backup file because of Permission denied.it's about I'm didn't install MTA but I use >/dev/null 2>&1 to disable crontab to sent it to email why it error ?
crontab error with (No MTA installed) but I use >/dev/null 2>&1
cron;configuration
Of course, the error is that you don't have a mailer (sendmail,postfix, etc) implemented and active.  That being said your other problem is that the >/dev/null 2>&1 ONLY only applies/associates to the LAST command in this case gzip.  Thus there must be some type of output going to STDERR for your mysqldump.The correct way to do what I think you want is: * * * * *  (command | command ) >/dev/null 2>&1