Home > Database > Mysql Tutorial > 使用mysqlhotcopy命令行工具创建备份

使用mysqlhotcopy命令行工具创建备份

WBOY
Release: 2016-06-07 16:08:27
Original
1187 people have browsed it

mysqlhotcopy是一段Perl语言编写的脚本,将FLUSH TABLES,LOCK TABLES以及cp/scp等命令封装调用,能够直接对数据库或某些指定的表

使用mysqlhotcopy命令行工具创建备份:

mysqlhotcopy是一段Perl语言编写的脚本,,将FLUSH TABLES,LOCK TABLES以及cp/scp等命令封装调用,能够直接对数据库或某些指定的表对象创建备份,方便用户执行

mysqlhotcopy只用于MyISAM和ARCHIVE引擎的表对象,不能适用于InnoDB表对象

[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).

本文永久更新链接地址:

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template