使用mysqlhotcopy命令列工具建立備份

來源:互聯網
上載者:User

使用mysqlhotcopy命令列工具建立備份

使用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).

本文永久更新連結地址:

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.