Description of the mysqlhotcopy command preface mysqldump adopts an SQL-level backup mechanism, which imports data tables into SQL script files. When a database is large, it occupies a large amount of system resources and supports commonly used MyISAM, innodb mysqlhotcopy is only a simple process of cache writing and file replication. It consumes much faster resources and backup speed than mysqldump. It is especially suitable for large databases. However, note that mysqlhotcopy only supports MyISAM engines and uses mysqlhotcopy. perl must be installed because mysqlhotcopy is written in prel language. So install the following three perl packages: [plain] yum install-y perl-DBI perl-DBD-MySQL. If you have installed mysql properly, whether installed through yum, apt-get or source code, you can directly use mysqlhotcopy. mysqlhotcopy is a Perl script, which was originally written and provided by Tim Bunce. It uses lock tables, flush tables, and cp or scp to quickly back up databases. It is the fastest way to back up a database or a single table, but it can only run on the machine where the database directory is located. Mysqlhotcopy is only used to back up MyISAM. It runs in Unix and NetWare. In practice, I personally have a habit of refreshing the binlog During Hot Standby. mysqlhotcopy has the flushlog parameter that supports this function. So let's take a look at the binlog logs in the database, as shown below: Check the position where the binlog is used in the specific binlog file. You can run the following command, once you know this, you can start hot backup. $ mysqlhotcopy-u user-p password -- flushlog djangodb/tmp # Note that there must be spaces between-u user-p password, otherwise, mysqlhotcopy cannot be identified. Here, the mysqldump command is different from mysql. djangodb refers to the database name/tmp refers to the directory location to be backed up. After the backup, A directory of djangodb will be generated under/tmp, which contains related data files. For example, note that you must have select and reload (to flush tables ), lock tables permission. After the backup, you can check the binlog again. At this moment, there is an additional binlog. The position in the binlog is also changed. Here -- flushlog is mainly used for backup and reply considerations. Generally, this is enough. If you have special requirements, you can take a look at the specific parameters of man mysqlhotcopy.