ghkaren
ghkaren

Reputation: 601

Dump MySql Db by daterange

I have a large database, and I want to dump the data after custom day, how would I do that?

Upvotes: 0

Views: 222

Answers (2)

user319198
user319198

Reputation:

You can specify a "where" condition .

Dumps only rows selected by the given WHERE condition.

Upvotes: 0

Naveen Kumar
Naveen Kumar

Reputation: 4601

Use Mysqldump where

or try to export schema and data seperately for each table with below command

mysqldump --user=dbuser --password --tab=/tmp dbname

you will have one tablename.sql file containing each table's schema (create table statement) and tablename.txt file containing the data in /tmp directory.

if you want a dump with schema only, add the --no-data flag:

mysqldump --user=dbuser --password --no-data --tab=/tmp dbname

Upvotes: 1

Related Questions