mysqldump with where caluse, selectively exporting data that matches the conditions.
One of this features of the MySQL mysqldump utility is to adapt the individual queries in order to limit the rows selected in the backup. This is achieved with the “-w” or “–where” which appends the same WHERE clause on each of the tables.
e.g.
One of this features of the MySQL mysqldump utility is to adapt the individual queries in order to limit the rows selected in the backup. This is achieved with the “-w” or “–where” which appends the same WHERE clause on each of the tables.
e.g.
mysqldump -uroot db_customer customer_table -w "date(cust_insert_time) < '2013-06-01 00:00:00' " --opt > db_db_customer customer_table_beforejun1.sqlor
mysqldump -uroot --no-create-info db_customer customer_table -w "date(cust_insert_time) < '2013-06-01 00:00:00' " --opt > db_db_customer customer_table_beforejun1.sql
No comments:
Post a Comment