I know that to take database dump I can ignore some tables. but I want to take the dump of all table with some percentage of data like 20% 40% because the whole dump is too big. here is my normal dump query.
mysqldump -h dburl -u user -p password --databases dbname > dbname.sql
I am not looking for specific OS and using Linux Ubuntu.
mysqldump -h dburl -u user -p password --no-data --databases dbname > dbname.schema.sql
to get DB schema, then a sequence ofSELECT ... INTO OUTFILE
statements to dump tables data with filtering. AndLOAD DATA INFILE
statements to load data back. See dev.mysql.com/doc/refman/8.0/en/select-into.html for details. – Margaretemargaretha