Possibility to use mysqlpump instead of mysqldump in mysql 8

Guillermo Calvo shared this idea 2 years ago
Gathering Feedback

mysqldump is way faster than mysqldump and the syntax is almost the same, it would be nice to have the choice to use it in supported servers (MySQL 8)

Best Answer
photo

Hello,

We'd like to follow up that you can swap mysqldump to mysqlpump via the JetBackup 5 Binary Location Settings (Settings > Binary Locations Tab > `mysqldump` Binary Location) and specify the location of the mysqlpump binary or bash wrapper.

However, please take time to review and determine whether the flags/arguments we utilize in mysqldump are compatible with mysqlpump and fit your needs or you may need to create a Bash wrapper in order to translate the mysqldump syntax to the correct mysqlpump syntax.

From our limited testing, we found the following flags we utilize in mysqldump that mysqlpump either supports out of the box(marked ✓) or needed to be removed/translated (marked ✕/->):


✕ --force
✕ --opt
     ✓ --add-drop-table
     ? --add-locks 
     ✕ --create-options 
     ✕ --disable-keys 
     ✓ --extended-insert 
     ✕ --lock-tables 
     ✕ --quick
     ✓ --set-charset
✕ --skip-lock-tables
-R -> --routines
-E -> --events


As a proof of concept, we were able to translate mysqldump to mysqlpump with the following Bash wrapper and were able to perform database backups and restores:

#!/bin/bash

#remove/translate mysqldump arguments not supported in mysqlpump

for arg in "$@"; do
shift
[ "$arg" = "--force" ] && continue
[ "$arg" = "--opt" ] && set -- "$@" "--add-drop-table" "--extended-insert" "--set-charset" && continue
[ "$arg" = "--skip-lock-tables" ] && continue
[ "$arg" = "-R" ] && set -- "$@" "--routines" && continue
[ "$arg" = "-E" ] && set -- "$@" "--events" && continue
set -- "$@" "$arg"
done

/usr/bin/mysqlpump "$@"
DISCLAIMER:


Please note that this is a Proof of Concept and is an unofficial workaround. Please use this workaround AT YOUR OWN RISK. We strongly recommend exercising due diligence when using this script and making changes or adjustments where appropriate, to fit your backup needs.


This script is provided AS-IS and JetApps Support cannot provide assistance with further modifications, customizations, or diagnosis of errors that may arise from this unofficial workaround.

Replies (2)

photo
1

Hello,

Thank you for leaving your feedback and opening a feature request. We will review your request and provide updates accordingly. Please note that we use the voting system to gauge demand for additional features. The more votes a request has, the more likely it will be up for consideration by our developers.

Thank you,

The JetApps Team

photo
1

Hello,

We'd like to follow up that you can swap mysqldump to mysqlpump via the JetBackup 5 Binary Location Settings (Settings > Binary Locations Tab > `mysqldump` Binary Location) and specify the location of the mysqlpump binary or bash wrapper.

However, please take time to review and determine whether the flags/arguments we utilize in mysqldump are compatible with mysqlpump and fit your needs or you may need to create a Bash wrapper in order to translate the mysqldump syntax to the correct mysqlpump syntax.

From our limited testing, we found the following flags we utilize in mysqldump that mysqlpump either supports out of the box(marked ✓) or needed to be removed/translated (marked ✕/->):


✕ --force
✕ --opt
     ✓ --add-drop-table
     ? --add-locks 
     ✕ --create-options 
     ✕ --disable-keys 
     ✓ --extended-insert 
     ✕ --lock-tables 
     ✕ --quick
     ✓ --set-charset
✕ --skip-lock-tables
-R -> --routines
-E -> --events


As a proof of concept, we were able to translate mysqldump to mysqlpump with the following Bash wrapper and were able to perform database backups and restores:

#!/bin/bash

#remove/translate mysqldump arguments not supported in mysqlpump

for arg in "$@"; do
shift
[ "$arg" = "--force" ] && continue
[ "$arg" = "--opt" ] && set -- "$@" "--add-drop-table" "--extended-insert" "--set-charset" && continue
[ "$arg" = "--skip-lock-tables" ] && continue
[ "$arg" = "-R" ] && set -- "$@" "--routines" && continue
[ "$arg" = "-E" ] && set -- "$@" "--events" && continue
set -- "$@" "$arg"
done

/usr/bin/mysqlpump "$@"
DISCLAIMER:


Please note that this is a Proof of Concept and is an unofficial workaround. Please use this workaround AT YOUR OWN RISK. We strongly recommend exercising due diligence when using this script and making changes or adjustments where appropriate, to fit your backup needs.


This script is provided AS-IS and JetApps Support cannot provide assistance with further modifications, customizations, or diagnosis of errors that may arise from this unofficial workaround.

Leave a Comment
 
Attach a file