# Multiple DataBases

**URL:** <https://forums.percona.com/t/multiple-databases/2317>\
**Category:** Percona XtraBackup\
**Created:** [December 18, 2012, 12:52pm UTC](https://forums.percona.com/t/multiple-databases/2317 "2012-12-18T12:52:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lflacayo](https://avatars.discourse-cdn.com/v4/letter/l/8797f3/32.png) [@lflacayo](https://forums.percona.com/u/lflacayo)\
**Post date:** [December 18, 2012, 12:52pm UTC](https://forums.percona.com/t/multiple-databases/2317/1 "2012-12-18T12:52:38Z")

</div>

Hi All,

Working in a scenario where we have ~20 databases on a single instance of myql (Percona 5.1), I have 3 servers, a prod, a reporting (replicating from prod) and a test environments. Right now I do dumps of each database and keep a copy of it from the reporting server and keep the dumps for a week. From time to time, I have to copy the data from prod to the test server. so I zcat the compress dump file and load it into the test.

This process works fine, but I am thinking that using XtraBackup would work better.

So my questions are these: Can I do something similar to mysqldump on each database and have separate files for each? How can I import just one database into the test server.

Thank you in advance.

Luis

---

<div class="post-metadata">

**Author:** ![miguelangelnieto](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@miguelangelnieto](https://forums.percona.com/u/miguelangelnieto)\
**Post date:** [December 27, 2012, 1:28am UTC](https://forums.percona.com/t/multiple-databases/2317/2 "2012-12-27T01:28:37Z")

</div>

Hi,

You can take a backup for each database using xtrabackup, that’s not a problem, but there are some limitations on the process.

1- You need to have innodb\_file\_per\_table\_enabled.  
2- The restore should be done importing individual tables one by one.  
3- The destination server must be Percona Server.

I’m going to give you some links to help you decide if XtraBackup is a good solution for your environment:

How to take partial backups:

[http://www.percona.com/doc/percona-xtrabackup/innobackupex/p](http://www.percona.com/doc/percona-xtrabackup/innobackupex/p) artial\_backups\_innobackupex.html

How to restore partial backups:

[http://www.percona.com/doc/percona-xtrabackup/innobackupex/i](http://www.percona.com/doc/percona-xtrabackup/innobackupex/i) mporting\_exporting\_tables\_ibk.html

Regards,

---

<div class="post-metadata">

**Author:** ![lflacayo](https://avatars.discourse-cdn.com/v4/letter/l/8797f3/32.png) [@lflacayo](https://forums.percona.com/u/lflacayo)\
**Post date:** [December 27, 2012, 7:31am UTC](https://forums.percona.com/t/multiple-databases/2317/3 "2012-12-27T07:31:48Z")

</div>

Thank you for your reply… So what I am hearing you say is that the process needs to be done on a table level. that would be a bit problematic, since each database has about 200 tables each… I will take a look at the links you graciously pointed me to. Thank you.
