Hi everyone,
I have a Ubuntu 10.04 LTS (Desktop) box that I am trying to backup with a script that's automatically triggered in a user's crontab with limited success.
The script exports data from the local MySQL server, uses GZip to compress it and then uses FTP to send it over the Internet to another computer.
I have tested the file after making it executable, and everything works to plan; there's a local backup of the DB, and the file is received on the remove server - no problem.
My problem comes when scheduling it. I currently have it on a schedule to run every hour at 15 minutes past between 08:15 and 18:15. The entry on my crontab looks as follows:
Code:
15 8 * * 1,2,3,4,5 /full/path/to/script.sh
15 9 * * 1,2,3,4,5 /full/path/to/script.sh
and so on ...
I know that I can use 8-18 and 1-5 to specify hour and day ranges ... This is how it's set out whilst testing.
If I SSH to the box and run the backup as the user that has it on their crontab, it runs fine. The job will then continue to run through until 18:15, and resume again at 08:15.
However, if the box is restarted/powered off; the schedule stops. Going back in to the crontab and saving it doesn't 'rescue' it.
The only thing that seems to rescue it running the script manually whilst connected to SSH. It will then continue to run on schedule as normal.
Any ideas as to what may be causing my insanity?
Any helps is massively appreciated!
All the best,
Nick