title: MySQLDump via shell script not being executed, why?
body: <p><strong>Hello all,</strong></p>
  
  <p>I trust you're well as you read this request for assistance.  I am not very experienced in the Linux world, but all the same I'm striving to learn as quickly as possible.  So please pardon any obvious ignorance on my part and assist if possible.</p>
  
  <p>I am running a ClearOS v5.2 Enterprise server (based on the Centos linux distro) and I'm using the following command in a shell script to backup my MySQL database.</p>
  
  <pre><code>mysqldump -u root -pMYPASSWORD --all-databases &gt; /mnt/shares/flexshares/backup/MySQL/mysql-backup-`date +%Y-%m-%d-%H-%M`.sql
  </code></pre>
  
  <p>I use a cron job to call this script @ 1:15 AM daily.  Now, I can see in the cron log that the job is executed at that time and the script is called, but the command doesn't execute (log entries below).  I say this because I don't see the sql file being created in the <strong>/mnt/shares/flexshares/backup/MySQL</strong> directory.</p>
  
  <pre><code>Aug 21 01:15:01 server1 crond[27842]: (root) CMD (/root/my_scripts/backup-mysql.sh)
  Aug 22 01:15:01 server1 crond[9031]: (root) CMD (/root/my_scripts/backup-mysql.sh)
  </code></pre>
  
  <p>Strangely enough, if I run the same command from the CLI it executes without any problems and the MySQL database is dumped to the target directory (<strong>/mnt/shares/flexshares/backup/MySQL</strong>).</p>
  
  <p>What am I missing or what have I included in the script that's causing it not to run?  Here's my shell script (<strong>"backup-mysql.sh"</strong>):</p>
  
  <pre><code>#!/bin/bash
  # FULL BACKUP OF MySQL DATABASE
  mysqldump -u root -pMYPASSWORD --all-databases &gt; /mnt/shares/flexshares/backup/MySQL/mysql-backup-`date +%Y-%m-%d-%H-%M`.sql
  </code></pre>
  
  <p>I am very grateful for any help I can get, thanks.</p>
  
  <p>v/r</p>
  
  <p>Kismet</p>