View Full Version : backup all database, but restore to one..possible?

May 19th, 2009, 03:34 PM
I was wondering if its possible to use the "all-database" backup option to backup all the databases, but if one DB gets corrupted or whatever, I can just restore to that one DB.


July 14th, 2009, 06:07 AM
Yes, you can restore only the databases you specify:

mysql-zrm --action restore --source-directory /var/lib/mysql-zrm/back-upset1/20060818121532 --databases db1 db2 db3

In my testing I have found that it will restore the shared InnoDB tablespace (ibdata1) and transaction logs (ib_logfile0 & ib_logfile1) even if the database(s) you select for restoration are MyISAM. I'm glad I discovered this on a test/dev box rather than in production. Perhaps it's a bug? I have attached the log.

- Chris