one script does not work at crontab
I made a rsync backup at crontab, but this rsync backup script does not work.
Quote:
Please let me know how to make rsync backup script works on crontab. Thanks in advance. |
For a start we'll need to see the code and you'll have to tell us exactly what the symptoms of "does not work" are; we're not mind readers.
|
You should put your cronjobs in /var/spool/cron/root not /etc/crontab or edit with
Code:
crontab -e Can you run the scripts from the commandline Code:
/root/backup_script/rsync_backup.sh JC |
jrosco/ Yes, I can run "rsync_backup.sh".
And "rsync_backup.sh" is this. Quote:
Quote:
|
The default env in cron is minimal to say the last. Best practice is to always specify complete paths to all cmds & files used unless you KNOW that the cron env will handle them correctly.... or specify a new env at the top of the script...
|
chrism01/ I changed and added env in cron as follows, but still not worked.
Quote:
|
run
Code:
which rsync JC |
jrosco/ Thanks!
"rsync_backup.sh" works fine! |
All times are GMT -5. The time now is 07:42 PM. |