Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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