Question

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?

Was it helpful?

Solution

Remove last redirection

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

or redirect stderr

... omeka > /home/groups/omeka/database/omeka.sql 2> /dev/null
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top