On my dedicated web server (Centos 64Bit) i was try to add two cronjobs to backup my files and database on my /home/ folder using this:
* 5 * * * cd /home; mysqldump -u root -h localhost -pmypasshere dbname | gzip > mydatabase-$(date +%d-%m-%Y).sql.gzip >/dev/null 2>&1
20 5 * * * cd /home; tar -zcf backup_files.tgz /home/nginx/domains/mydomain.com/public/ >/dev/null 2>&1
But it doesn't work and is not creating any files on /home/
When i use the commands manually all working great !
I also test cronjob to verify that is working and can drop files to home using this:
* * * * * /bin/echo "foobar" >> /home/testfile.txt
And after a minute i got on /home/ folder a new file there named testfile.txt
So cronjobs working...