I have a cron job set up

0 0 * * * /usr/bin/mysqldump -u omeka_admin -h localhost omeka > /home/groups/omeka/database/omeka.sql > /dev/null

Pass is stored in .my.cnf. It works great from the command line but everytime cron executes it, the resulting file is size zero

I tried putting in the pass, but got the same result. Again, it works great from the command line. Just in case there was some weird process going that interfered with the output but it's still not working

Any idea of what's going on?

有帮助吗?

解决方案

Remove last redirection

... omeka > /home/groups/omeka/database/omeka.sql

or redirect stderr

... omeka > /home/groups/omeka/database/omeka.sql 2> /dev/null
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top