How to exclude database from dump command while dumping all databases ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 3abdoelbub
    New Member
    • Sep 2010
    • 1

    How to exclude database from dump command while dumping all databases ?

    Hi,

    I'm using the following command to backup all databases creation only:

    mysqldump -u username --password=passwo rd --host=host --port=port --all-databases --no-data > D:\all_database s_creation.sql

    and I'd like to exclude specific database from those all databases.
    Is there any option like --ignore-table but to ignore database ? can I do something like that?

    Any suggestions will be appreciated ...
  • JKing
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    #2
    There is currently no mysql functionality to exlucde databases from a dump. What you can do is use the --databases option to include only specific databases.

    If you have a large number of databases this may not be ideal but it will work. Another option would be to seek out a third party program that extends mysql functionality.

    Comment

    Working...