Use the mysqlhotcopy command line tool to create a backup
Use the mysqlhotcopy command line tool to create a backup:
Mysqlhotcopy is a script written in Perl. It encapsulates and calls flush tables, lock tables, cp/scp, and other commands to create backups for databases or specified table objects.
Mysqlhotcopy is only used for table objects of MyISAM and ARCHIVE engines. It cannot be used for InnoDB table objects.
[Mysql @ mysql1 ~] $ Mysqlhotcopy-u system-p 123456-S/data/mysqldata/3306/mysql. sock mysql/tmp
Flushed 32 tables with read lock ('mysql '. 'columns _ priv', 'mysql '. 'db', 'mysql '. 'event', 'mysql '. 'func', 'mysql '. 'Help _ category ', 'mysql '. 'Help _ keyword', 'mysql '. 'Help _ relation', 'mysql '. 'Help _ topic ', 'mysql '. 'innodb _ index_stats', 'mysql '. 'innodb _ table_stats', 'mysql '. 'ndb _ binlog_index ', 'mysql '. 'plugin', 'mysql '. 'proc', 'mysql '. 'procs _ priv', 'mysql '. 'proxies _ priv', 'mysql '. 'servers', 'mysql '. 'slave _ master_info ', 'mysql '. 'slave _ relay_log_info ', 'mysql '. 'slave _ worker_info ', 'mysql '. 't_ csv1', 'mysql '. 't_ mem1', 'mysql '. 't_ mer1', 'mysql '. 't_ myd1 ', 'mysql '. 't_ mys1', 'mysql '. 't_ mys2 ', 'mysql '. 'tables _ priv', 'mysql '. 'Time _ zone ', 'mysql '. 'Time _ zone_leap_second ', 'mysql '. 'Time _ zone_name ', 'mysql '. 'Time _ zone_transition ', 'mysql '. 'Time _ zone_transition_type ', 'mysql '. 'user') in 0 seconds.
Locked 0 views () in 0 seconds.
Copying 93 files...
Copying indices for 0 files...
Unlocked tables.
Mysqlhotcopy copied 32 tables (93 files) in 0 seconds (0 seconds overall ).
This article permanently updates the link address: