Skip to content

Pablohn26/mysqlshdump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages