Detailed description of data backup methods based on MySQL command line mode in Linux-6.5
Understanding:
Logical backup: only backup some data in the table that meets the price adjustment, not all data. However, the unique difference is that text information is exported, which obviously saves space than mysqldump, which is beyond doubt; but the database table itself cannot be created. We cannot guarantee accuracy;
Therefore, mysqldump is easy to use. It is used only when you back up some rows of the table, and even when you back up some rows and some fields.
Format: SELECT clause into outfile ''load DATA infile' into table tb_name
1. connect to MySQL:
2. check that all Gender in the students table is M exported:
3. run this command to import/tmp:
4. view the stu.txt text in/tmp:
5. create a table with the same structure as the students table:
6. view the table structure:
7. Note that no data is inserted at this time:
8. import the stu.txt text under/tmp:
9. check whether the data in the table is imported:
10. if you have other backup tools, go left and check the configuration analysis of mysqldump, innobackupex, and LVM snapshots: