mysql dump - exclude some table data

后端 未结 8 1354
独厮守ぢ
独厮守ぢ 2021-01-30 10:40

Is it possible, using mysql dump to export the entire database structure, but exclude certain tables data from export.

Say the database has 200 tables, I wish to export

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-30 10:59

    This will produce export.sql with structure from all tables and data from all tables excluding table_name

    mysqldump --ignore-table=db_name.table_name db_name > export.sql
    mysqldump --no-data db_name table_name >> export.sql
    

提交回复
热议问题