Can I get a dump of all my databases *except one* using mysqldump?

Posted by Daniel Magliola on Stack Overflow See other posts from Stack Overflow or by Daniel Magliola
Published on 2010-05-26T23:09:59Z Indexed on 2010/05/26 23:11 UTC
Read the original article Hit count: 337

Filed under:
|
|

I'm currently using mySQLdump to backup my dev machine and servers.

There is one project I just started, however, that has a HUUUUUGE database that I don't really need backed up, and i'll be a big problem to add it to the rest of the backup cycle.

I'm currently doing this:

"c:\Program Files\mysql\MySQL Server 5.1\bin\mysqldump" -u root -pxxxxxx --all-databases > g:\backups\MySQL\mysqlbackup.sql

Is it possible to somehow specify "except this database(s)"?

I wouldn't like to have to specify the list of DBs manually, since that would mean that I'd have to remember updating my backup batch file every time I create a new DB, and I know that's not gonna happen.

EDIT: As you probably guessed from my command line above, i'm doing this on Windows, so I can't do any kind of fancy bash stuff, only wimpy .bat things.

Alternatively, if you have other ideas to solve this same issue, they are more than welcome, of course!

Thanks
Daniel

© Stack Overflow or respective owner

Related posts about backup

Related posts about mysqldump