mysqlpump - A MySQL Database Backup Program


The mysqlpump client utility performs logical backups, thereby producing a set of SQL statements that would be executed to reproduce the original database object definitions and table data. It helps dump one or more MySQL databases for backup or transfer to another SQL server.

Features of mysqlpump

Let us understand the features of mysqlpump −

  • Parallel processing of databases, as well as that of objects within databases, thereby helping speed up the dump process.

  • It provides better control over which databases and database objects (tables, stored programs, user accounts) need to be dumped

  • Dumping of user accounts as account-management statements (CREATE USER, GRANT) instead of as inserts into the mysql system database

  • It has the capability to create compressed output.

  • It is the progress indicator that provides the values which are estimates.

  • For dump file reloading, it facilitates faster secondary index creation for InnoDB tables by adding indexes after the rows have been inserted.

Syntax - Invoke mysqldump

By default, mysqlpump dumps all databases. To specify this behavior explicitly, the --all-databases option can be used. It has been shown below −

shell> mysqlpump --all-databases

To dump a single database, or specific tables within a database, the database name has to be specified on the command line, optionally followed by table names. It has been shown below −

shell> mysqlpump db_name
shell> mysqlpump db_name tbl_name1 tbl_name2 ...

To treat all name arguments as database names, the --databases option can be used. It has been shown below −

shell> mysqlpump --databases db_name1 db_name2 ...

The mysqlpump utility supports several options to include or exclude databases, tables, stored programs, and user definitions. To reload a dump file, the statements contained in it need to be executed. The below example shows the same −

shell> mysqlpump [options] > dump.sql
shell> mysql < dump.sql

Updated on: 10-Mar-2021

496 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements