mysqldump and cron advice needed
|
|
Hi all Hoping someone can offer some advice … once a week, I take a mysqldump backup of my database. I always run this command from a terminal screen:
It works perfectly. To save me logging in once a week, I want to set it up as a cron job which runs every Sunday and on the 1st of each month. I’ve used
Nothing seems to happen (there’s no backup file created). I first thought I’d scheduled it to only run on Sunday’s that are the first of the month but I’ve also tried 0 7 * * * to no avail. I have a suspicion it might be something to do with the pipe but any advice would be greatly appreciated. Thanks Mike |
|
|
Hi again Just to say that I think this was to do with the pipe. I moved the command into an external .sh file then called that file from cron and it worked perfectly. Extra note: I store the .sh file in a subversion repository. I needed the following command to mark it as executable:
Cheers! Mike |