Menu

#4878 MySql module get corrupted backup in a specific scenario

1.830
closed-fixed
nobody
Mysql (1)
5
2017-01-23
2017-01-22
No

The mysqldump utility sometimes get unfinished backup.

The scenario is:
1-A database with views that referes to databases held in another database;
2-The object in other database changes (ex. remove column) and breakup the view;
3-The mysqldump hangs on get text of view (due to above) but webmin module didn't report the error and backup becomes corrupt;

In my opinion, the module should report error in the e-mail for above situation.

Please feel free to contact me to get more details.

Discussion

  • Jamie Cameron

    Jamie Cameron - 2017-01-22

    So the view was deleted while the backup was running? If so, there isn't much Webmin can do, as it doesn't supply the view list to mysqldump.

     
  • Flavio Peinado

    Flavio Peinado - 2017-01-22

    Hi Jamie,

    The view wasn't deleted. The view itself was inconsistent.

    The problem in the database itself isn't the point.

    The mysqldump execution ended with error that Webmin didn't caught and this is the point. If webmin catch the error, will be clear to take the proper database action.

    Thanks for your attention.

     
  • Jamie Cameron

    Jamie Cameron - 2017-01-23

    Do you happen to know what the output was from mysqldump in this case? Or better still, it's exit code, as that's what Webmin uses to detect failure.

     
  • Flavio Peinado

    Flavio Peinado - 2017-01-23

    Taken from client/mysqldump.c in MySQL 5.1.59:

    define EX_USAGE 1
    define EX_MYSQLERR 2
    define EX_CONSCHECK 3
    define EX_EOM 4
    define EX_EOF 5 / ferror for output file was got /
    define EX_ILLEGAL_TABLE 6

    Probably you need to capture the non error code.

     
  • Jamie Cameron

    Jamie Cameron - 2017-01-23
    • status: open --> closed-fixed
     
  • Jamie Cameron

    Jamie Cameron - 2017-01-23

    Ok, I see the issue now - in some cases, Webmin isn't detecting the mysqldump exit code properly at all! This will be fixed in the next Webmin release.

     

Log in to post a comment.