Skip to content

Latest commit

 

History

History
38 lines (20 loc) · 1.57 KB

README.md

File metadata and controls

38 lines (20 loc) · 1.57 KB

mysqlshdump

mysqlshdump is a mysqlsh wrapper to run mysqldump commands using mysqlsh with the same parameters than mysqldump

While mysqldump has been the main tool to create logical backups of MySQL since many year, now mysqlsh is a better tool in terms of performance.

With this wrapper we can keep working mysqldump commands like:

mysqldump -h127.0.0.1 -uuser -ppass --databases db > file.sql

wrapped to be launched with mysqlsh:

mysqlsh -h127.0.0.1 -uuser -ppass --py -e 'util.dump_schemas("db","/folder")'

The only changes you have to make are:

  • Change the main command from mysqldump to mysqlshdump

  • Change the bash redirection to a file by an empty folder where mysqlsh will dump the files. If that folder does not exist or is not empty, a new folder name with a timestamp will be used.

So you have to change this line:

mysqldump -h127.0.0.1 -uuser -ppass --databases db > file.sql

by

mysqlshdump -h127.0.0.1 -uuser -ppass --database db folder

Useful links:

TODO

  • Implement --triggers and --routines options