Not work MySQL backup

  • Hello.
    I have OMV 3.0.86 and installed MySQL plugin.
    SQL work fine but I have a problem with backup database.
    When I press "Backup" nothing happens.


    When I create "Scheduled backup" and try to run it I have this error:


  • I have similar or better to say same issue in 3.0.88


    Code
    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 -- omv-rpc MySql dumpDatabaseToSharedFolder '{"uuid":"dedfa955-c9e0-4231-aed1-a8b697ee9f8d"}' 2>&1' with exit code '1': {"response":null,"error":{"code":0,"message":"Failed to execute command 'export PATH=\/bin:\/sbin:\/usr\/bin:\/usr\/sbin:\/usr\/local\/bin:\/usr\/local\/sbin; export LANG=C; mysqldump --defaults-extra-file='\/etc\/openmediavault\/mysqldump.cnf' --all-databases --result-file=\/srv\/dev-disk-by-label-omv-backup\/mysql\/mysql-2017-10-22T21:34:56+0200.sql' with exit code '1': ","trace":"exception 'OMV\\ExecException' with message 'Failed to execute command 'export PATH=\/bin:\/sbin:\/usr\/bin:\/usr\/sbin:\/usr\/local\/bin:\/usr\/local\/sbin; export LANG=C; mysqldump --defaults-extra-file='\/etc\/openmediavault\/mysqldump.cnf' --all-databases --result-file=\/srv\/dev-disk-by-label-omv-backup\/mysql\/mysql-2017-10-22T21:34:56+0200.sql' with exit code '1': ' in \/usr\/share\/php\/openmediavault\/system\/process.inc:175\nStack trace:\n#0 \/usr\/share\/openmediavault\/engined\/rpc\/mysql.inc(284): OMV\\System\\Process->execute()\n#1 \/usr\/share\/openmediavault\/engined\/rpc\/mysql.inc(175): OMV\\Engined\\Rpc\\MySql->dumpDatabase('\/srv\/dev-disk-b...', '\/etc\/openmediav...')\n#2 [internal function]: OMV\\Engined\\Rpc\\MySql->dumpDatabaseToSharedFolder(Array, Array)\n#3 \/usr\/share\/php\/openmediavault\/rpc\/serviceabstract.inc(124): call_user_func_array(Array, Array)\n#4 \/usr\/share\/php\/openmediavault\/rpc\/rpc.inc(86): OMV\\Rpc\\ServiceAbstract->callMethod('dumpDatabaseToS...', Array, Array)\n#5 \/usr\/sbin\/omv-engined(536): OMV\\Rpc\\Rpc::call('MySql', 'dumpDatabaseToS...', Array, Array, 1)\n#6 {main}"}}


    I'm not an expert but probably problem is with generated command


    Code
    omv-rpc MySql dumpDatabaseToSharedFolder '{"uuid":"dedfa955-c9e0-4231-aed1-a8b697ee9f8d"}'

    I've checked /dev/disk/by-uuid and I don't have link with this uuid



    Code
    root@omv:/dev/disk/by-uuid# ll
    total 0
    drwxr-xr-x 2 root root 160 Oct 20 22:28 .
    drwxr-xr-x 6 root root 120 Oct 20 22:28 ..
    lrwxrwxrwx 1 root root 10 Oct 20 22:28 16F535FE3FF80700 -> ../../sdb1
    lrwxrwxrwx 1 root root 10 Oct 20 22:28 3B35A97D53ABEABD -> ../../sda2
    lrwxrwxrwx 1 root root 15 Oct 20 22:28 3be1863a-6aa6-4109-9561-5aebdbbe10c8 -> ../../mmcblk0p3
    lrwxrwxrwx 1 root root 15 Oct 20 22:28 a53d1120-f131-42f1-9eaa-334526c2ae70 -> ../../mmcblk0p4
    lrwxrwxrwx 1 root root 15 Oct 20 22:28 ae708a4d-982a-4a20-965c-01ec7e1f32b3 -> ../../mmcblk0p2
    lrwxrwxrwx 1 root root 15 Oct 20 22:28 CE83-8CE1 -> ../../mmcblk0p1
  • I've checked /dev/disk/by-uuid and I don't have link with this uuid

    That is the uuid of the shared folder in the database not the disk uuid.


    What is the output of:


    mysqldump --defaults-extra-file='/etc/openmediavault/mysqldump.cnf' --all-databases --result-file=/srv/dev-disk-by-label-omv-backup/mysql/mysql-2017-10-22T21:34:56+0200.sql

    omv 5.5.22 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.4
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Code
    Could not open required defaults file: /etc/openmediavault/mysqldump.cnf
    Fatal error in defaults handling. Program aborted


    Code
    root@omv:~# ll /etc/openmediavault/
    total 124K
    drwxr-xr-x 2 root root 4.0K Oct 22 00:20 .
    drwxr-xr-x 116 root root 4.0K Oct 21 19:11 ..
    -rw-rw---- 1 root openmediavault-config 43K Oct 22 00:19 config.xml
    -rw-r--r-- 1 root root 70K May 5 00:46 php.ini
  • Could not open required defaults file: /etc/openmediavault/mysqldump.cnf

    That is a temporary file created by the code - https://github.com/OpenMediaVa…ngined/rpc/mysql.inc#L242


    No idea why that is failing on your system.

    omv 5.5.22 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.4
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Have you reset the mysql password from the mysql plugin? It creates the file that is missing.

    omv 5.5.22 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.4
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I had this same problem.


    I originally created the mysql (from memory: outside of omv) for openkm in omv 2.x which has since been upgraded to 3.x.
    I recently used the plugin schedule backup job, instead of the async i had previously been running.




    Have you reset the mysql password from the mysql plugin? It creates the file that is missing.


    Solved my problem - i think....but i am getting this message "stdin: is not a tty" in the email sent to me

  • My MYSQL backup call returns just NULL.

    Code
    root@openmediavault:~# omv-rpc MySql dumpDatabaseToSharedFolder '{"uuid":"b761ad8c-140e-4136-80fc-8f76cfabf573"}'
    null
    root@openmediavault:~#

    Whats wrong here?

  • i've als get a lot of errors by mail. Don't know hoe to fix these errors and making a schedule backup. This is an example of one of my mails.


    {"response":null,"error":{"code":0,"message":"Failed
    to execute XPath query
    '\/\/system\/shares\/sharedfolder[uuid='a9c68722-9ff2-4931-bcdf-537b7d4ea214']'.","trace":"exception
    'OMV\\Config\\DatabaseException' with message 'Failed to execute XPath
    query
    '\/\/system\/shares\/sharedfolder[uuid='a9c68722-9ff2-4931-bcdf-537b7d4ea214']'.'
    in \/usr\/share\/php\/openmediavault\/config\/database.inc:78\nStack
    trace:\n#0
    \/usr\/share\/openmediavault\/engined\/rpc\/sharemgmt.inc(1018):
    OMV\\Config\\Database->get('conf.system.sha...',
    'a9c68722-9ff2-4...')\n#1 [internal function]:
    OMVRpcServiceShareMgmt->getPath(Array, Array)\n#2
    \/usr\/share\/php\/openmediavault\/rpc\/serviceabstract.inc(124):
    call_user_func_array(Array, Array)\n#3
    \/usr\/share\/openmediavault\/engined\/rpc\/mysql.inc(163):
    OMV\\Rpc\\ServiceAbstract->callMethod('getPath', Array, Array)\n#4
    [internal function]:
    OMV\\Engined\\Rpc\\MySql->dumpDatabaseToSharedFolder(Array,
    Array)\n#5 \/usr\/share\/php\/openmediavault\/rpc\/service
    abstract.inc(124): call_user_func_array(Array, Array)\n#6
    \/usr\/share\/php\/openmediavault\/rpc\/rpc.inc(86):
    OMV\\Rpc\\ServiceAbstract->callMethod('dumpDatabaseToS...', Array,
    Array)\n#7 \/usr\/sbin\/omv-engined(536): OMV\\Rpc\\Rpc::call('MySql',
    'dumpDatabaseToS...', Array, Array, 1)\n#8 {main}"}}

  • im getting this error too


    stdin: is not a tty
    {"response":null,"error":{"code":0,"message":"Failed to read from socket: Resource temporarily unavailable","trace":"exception 'OMV\\Rpc\\Exception' with message 'Failed to read from socket: Resource temporarily unavailable' in \/usr\/share\/php\/openmediavault\/rpc\/rpc.inc:171\nStack trace:\n#0 \/usr\/sbin\/omv-rpc(107): OMV\\Rpc\\Rpc::call('MySql', 'dumpDatabaseToS...', Array, Array, 2)\n#1 {main}"}}

  • So, I tried deleting the mysql plugin backup schedule and made a new weekly one.
    I then went to the "scheduled jobs" and tried to run the weekly job that was created manually. I got the following error


    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 -- omv-rpc MySql dumpDatabaseToSharedFolder '{"uuid":"ab250e2c-d9c3-4030-85b6-e0508ea4d0dd"}' 2>&1' with exit code '1': {"response":null,"error":{"code":0,"message":"Failed to read from socket: Resource temporarily unavailable","trace":"exception 'OMV\\Rpc\\Exception' with message 'Failed to read from socket: Resource temporarily unavailable' in \/usr\/share\/php\/openmediavault\/rpc\/rpc.inc:171\nStack trace:\n#0 \/usr\/sbin\/omv-rpc(107): OMV\\Rpc\\Rpc::call('MySql', 'dumpDatabaseToS...', Array, Array, 2)\n#1 {main}"}}


    Error #0:exception 'OMV\ExecException' with message '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 -- omv-rpc MySql dumpDatabaseToSharedFolder '{"uuid":"ab250e2c-d9c3-4030-85b6-e0508ea4d0dd"}' 2>&1' with exit code '1': {"response":null,"error":{"code":0,"message":"Failed to read from socket: Resource temporarily unavailable","trace":"exception 'OMV\\Rpc\\Exception' with message 'Failed to read from socket: Resource temporarily unavailable' in \/usr\/share\/php\/openmediavault\/rpc\/rpc.inc:171\nStack trace:\n#0 \/usr\/sbin\/omv-rpc(107): OMV\\Rpc\\Rpc::call('MySql', 'dumpDatabaseToS...', Array, Array, 2)\n#1 {main}"}}' in /usr/share/openmediavault/engined/rpc/cron.inc:175Stack trace:#0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(528): OMVRpcServiceCron->{closure}('/tmp/bgstatusEW...', '/tmp/bgoutputD1...')#1 /usr/share/openmediavault/engined/rpc/cron.inc(179): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))#2 [internal function]: OMVRpcServiceCron->execute(Array, Array)#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)#4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('execute', Array, Array)#5 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Cron', 'execute', Array, Array, 1)#6 {main}



    in my cron daemon notifications, i get the following error


    stdin: is not a tty
    {"response":null,"error":{"code":0,"message":"Failed to read from socket: Resource temporarily unavailable","trace":"exception 'OMV\\Rpc\\Exception' with message 'Failed to read from socket: Resource temporarily unavailable' in \/usr\/share\/php\/openmediavault\/rpc\/rpc.inc:171\nStack trace:\n#0 \/usr\/sbin\/omv-rpc(107): OMV\\Rpc\\Rpc::call('MySql', 'dumpDatabaseToS...', Array, Array, 2)\n#1 {main}"}}



    seems to be a long time running this error. i

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!