In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Database backup mysqldump-uroot-p123456-P3306-- single-transaction database_name > / data/dbname.sql.gz Note: in a production environment, if you add-- single-transaction, the table will not be locked during backup. Mysql multi-table batch backup is placed in the fang library, and all tables containing kk are backed up. For i in `mysql-uroot-p123123-e "use fang;show tables" | grep 'kk' `do mysqldump-uroot-p123123 fang $I > / root/j_$i done
Mysql command parsing
-u pick up user name
-p access password
-P Port number
-e connects to the specific database sql. Note that quotation marks are needed to cause sql.
Grep related commands
-I ignore letter case
-v selected has been excluded.
Note: the symbol function is to execute the command first.
Mysql multi-table batch recovery mysql multi-database multi-table batch backup searches all library names containing aa, then searches all tables containing kk from the library, and exports data (required tables) for db in `mysql-uroot-p123123-e "show databases" | grep 'aa' `do for i in `mysql-uroot-p123123-e "use $db" Show tables "| grep 'kk' `do mysqldump-uroot-p123123 fang $I > / root/j_$db_$i done donemysql multi-database, multi-table batch recovery, batch filter backup database table mysql-uifly_ad-h20.150.100.119-P3306-p ifly_cpcc_ad_statis_v2-e" show tables "| grep-Ev' hour | Tables_in' | xargs mysqldump-uifly_ad -h20.150.100.119-P3306-p ifly_cpcc_ad_statis_v2 > ifly_cpcc_ad_statis_v2_$ (date +% F). Sql
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.