Scheduled cron for mysqldump is not working, but runs fine when manually entered

    • Scheduled cron for mysqldump is not working, but runs fine when manually entered

      Command: mysqldump --user='root' --password='whatever' --all-databases > all_databases.sql

      The command works great when manually run, however when using the scheduled jobs the following error shows. Could it be because I have a $ symbol in my password?

      Source Code

      1. Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; export SHELL=/bin/sh; sudo --shell --non-interactive --user=root -- mysqldump --user='root' --password='whatever' --all-databases > /store1/Backup/MySQL/all_databases.sql 2>&1' with exit code '2':
      2. Error #0:
      3. OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; export SHELL=/bin/sh; sudo --shell --non-interactive --user=root -- mysqldump --user='root' --password='U$$voyager0203' --all-databases > /store1/Backup/MySQL/all_databases.sql 2>&1' with exit code '2': in /usr/share/openmediavault/engined/rpc/cron.inc:175
      4. Stack trace:
      5. #0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(565): OMVRpcServiceCron->{closure}('/tmp/bgstatusiQ...', '/tmp/bgoutputkj...')
      6. #1 /usr/share/openmediavault/engined/rpc/cron.inc(179): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      7. #2 [internal function]: OMVRpcServiceCron->execute(Array, Array)
      8. #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      9. #4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('execute', Array, Array)
      10. #5 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Cron', 'execute', Array, Array, 1)
      11. #6 {main}
      Display All
    • If it is OMV4, then root shouldn't need a password and the backup cron job should be using omvadmin with a password.
      omv 4.1.12 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.11
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Users Online 1

      1 Guest