xtrabackup - individual database backup and restore

49 views
Skip to first unread message

David Reagan

unread,
Jun 1, 2017, 5:58:28 PM6/1/17
to Percona Discussion
Hey all,

When restoring individual databases that were backed up using the partial backup options, do you still have to shut down the entire mysql server process?

On this doc page, there is this note:

Note

The datadir must be empty before restoring the backup. Also it’s important to note that MySQL server needs to be shut down before restore is performed. You can’t restore to a datadir of a running mysqld instance (except when importing a partial backup)

So, it sounds like a partial backup can be restored to a running server. But what datadir would need to be empty in that situation?


Just for some background on where these questions are coming from:

What I'm trying to do is create a single backup per application. So if I have a drupal site, a wordpress site, and a custom site all relying on databases hosted on the same mysql server, I want to be able to back up the database at the same time as I back up the app data and code. I wouldn't want to keep the databases for all three apps together in the same backup.

My old method is just to run mysqldump. But I'm working on implementing a better backup strategy across my stuff, so I figured I'd evaluate xtrabackup as well.

Thanks in advance!

Lorraine Pocklington

unread,
Oct 12, 2017, 10:17:53 AM10/12/17
to Percona Discussion
Hi David
I am sure you will have got to the bottom of this by now and found something that works for you. 
However, just in case(!) - or for future browsers of this page - I think that this page covers the scenario, conditions and likely solution 
https://www.percona.com/doc/percona-xtrabackup/LATEST/howtos/recipes_ibkx_partition.html 

Reply all
Reply to author
Forward
0 new messages