Not the answer you need?
Register and ask your own question!

local restore

epipkoepipko EntrantInactive User Role Beginner
Hi all,
I am very new to Percona and MySQL in general. I have a backup directory "2015-01-08 00-00-00" inside of which I see directories of all local database backups. I need to be able to restore one of the databases into another. How do I go about it?

Thanks,

Comments

  • scott.nemesscott.nemes MySQL Sage Current User Role Patron
    Hi epipko;

    Below is a guide for taking/preparing/restoring partial backups:
    http://www.percona.com/doc/percona-xtrabackup/2.2/innobackupex/partial_backups_innobackupex.html

    To restore just a single database out of a backup with multiple databases, you basically just restore individual tables. So if you wanted to restore an entire database, you would just restore all the tables in that specific database from the backup. That for restoring individual tables can be found here:

    http://www.percona.com/doc/percona-xtrabackup/2.2/innobackupex/restoring_individual_tables_ibk.html

    So how you go about it mostly depends on what you are trying to do. If you want to start with a partial backup, then I'd follow the first guide. That will give you a backup of just the DB(s) you want, which you can then restore. If you want to just cherry pick specific databases out of a full backup, then you'll have to follow the second linked guide to restore individual tables. This process can be difficult if there are lots of tables. You can script it, and there are probably scripts out there if you Google around, but it's not necessarily easy if you are not very familiar with MySQL and Xtrabackup in general.

    -Scott
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.