Have made backup script that does well: makes backup zip-file and then uploads it via ftp to another server. It’s located here: /home/www/web5/backup/backup
Then I decided to put this script into crontab to be done automatically.
I’m doing (as root)
crontab -e
On the blank row I put:
*/1 * * * * /home/www/web5/backup/backup
Escape key, :wq!, Enter
I set it to be done each minute to test it.
Then went to the FTP folder, where script uploads the files. I’m waiting, but nothing happens: catalog is empty after each refresh in my Total Commander.
But when I execute /home/www/web5/backup/backup manually (as root as well), it works just fine and I see the new file at FTP.
What’s wrong? This server is kind of heritage, so I might know not everything about it. Where to check first? OS is
Linux s090 2.6.18.8-0.13-default
(kind of very old CentOS).
Thanks for any help!
UPD: /home/www/web5/backup/backup has chmod 777
UPD2: /var/log/cron doesn’t exist. But /var/log/ directory exists and contains logs of apache, mail, etc.
*/1 may be the problem. Just use *.
Also, make sure
/home/www/web5/backup/backupis executable withchmod 775 /home/www/web5/backup/backupCheck
/var/log/cronas well. That may show errors leading to a fix.From Crontab – Quick Reference