First, you need the full path to the script as @attomos said. The easiest way to get this is to run cd relative/path/to/script/directory
and then pwd
or echo "$PWD"
to get the current directory.
Second, the Backup_DB/alldatabases_test.sql.gz
path inside the script is now relative to the system root, so the script tries to save it to /Backup_DB/alldatabases_test.sql.gz
, which probably was not intended. You need to make that path absolute as well: /root/Backup_DB/alldatabases_test.sql.gz
.
You should see some error output from this in /var/log/cron
.