----- Original Message ----- From: "Emi Lu" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 31, 2004 4:13 PM Subject: mysqldump all tables except 2 in a database
> Hello all, > > In mysql, do we have a way to "mysqldump" all tables except two in a > database. I know we have the way only dump schema, only data, a specific > table, both data structure and data. But could someone help me about > dumping all tables in a structure except two. > > For example, in databse "D1", I have 10 tables, I'd like to dump 8 of > them at one time. > You haven't said which version of MySQL you are using or what operating system you are running so this may not be much use to you. I am running MySQL 4.0.15 on Linux Mandrake 8.2. A bash script I posted earlier today could probably be adapted to do what you want. It acquires the names of all of the databases and takes backups of them; all you'd have to do is add an 'if' statement that excluded the two databases that you didn't want to dump. I have attached the script again to this note since it is rather hard to read when it is wrapped in the email editor. Let me know if you have any questions about the script. Rhino
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]