Find the answer to your Linux question:
Results 1 to 2 of 2
Hello, I am new to using cron jobs, and I have need to create a dump file of all the mysql databases daily. I set up a cron job, but ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Jan 2012
    Location
    Ohio
    Posts
    175

    mysqldump cron job won't run


    Hello, I am new to using cron jobs, and I have need to create a dump file of all the mysql databases daily. I set up a cron job, but it won't run. I installed it as follows:

    crontab -e
    15 10 * * * /usr/bin/mysqldump --all-databases -u root -p'*password*' | gzip -c > /home/db_backup/database_`date +%a`.sql.gz
    saved and closed the file
    restarted cron daemon

    The job will not kick off. I run the command manually and it works just fine.

    Do I have to do this as a script file?

    Any ideas?

  2. #2
    Linux Newbie
    Join Date
    Jan 2012
    Location
    Ohio
    Posts
    175

    fixed

    Nevermind. I fixed it. For some reason, cron was stopping in the file name. I changed the name and it worked fine. I will just have to set up different jobs for different days of the week as I want a weeks worth of backups.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •