I very often need to create a backup of a database and import it using a different schema name. These schema's are pretty large (3-5GB) and mysqldump is a pain. xtrabackup seems promising but I cannot find how to import a backup using a different database name.

Any clues?


xtrabackup is very different than mysqldump. It doesn't generate a dump of schema data that is "restored" -- it actually opens your tables with a running copy of InnoDB and generates tablespace data that is directly usable by MySQL. For most purposes, it behaves like a cold backup of your data directory. After applying incrementals, there is no actual restore procedure involved with xtrabackup other than simply copying the backup into place and starting MySQL.

What might work is to export and import individual tables as described in http://www.percona.com/doc/percona-xtrabackup/xtrabackup_bin/exporting_importing_tables.html. I have not verified that this will work between schemas of different names, but I cannot think of a reason why it wouldn't.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.