0

I'm using percona xtrabackup to do full DB backups on mariadb 10 and now i'm testing the restore.

I want to restore just some databases (the important DBs) and ignore others (big archive DBs), simulation a total DB lost to check how much time i would take to restore the most important stuff to get business resume. Tying to recover everything would take much longer as the archives are not critical and could be recovered later.

The problem is (AFAIK) xtrabackup seems to only support full restores.

So is there any way to do a partial restore (only restore some DBs) with xtrabackup, using a full xtrabackup backup

Thanks

higuita
  • 1,093
  • 9
  • 13
  • xtrabackup supports partial restore, but innodb_file_per_table must be ON – akuzminsky Oct 12 '15 at 17:23
  • i have it enabled. But yet i'm unable to find how to do it. Any pointer is welcome. – higuita Oct 12 '15 at 22:10
  • After you enable innodb_file_per_table the table are still in ibadat1. To move them to their own table space you need to run ALTER TABLE .. ENGINE INNODB for each table. It'll be blocking, so use pt-online-schema-change. Then check percona's how to https://www.percona.com/doc/percona-xtrabackup/2.2/innobackupex/partial_backups_innobackupex.html – akuzminsky Oct 12 '15 at 22:23
  • I already have the since the DB creation, but anyway, the document you refer tells how t backup a partial DB. I don't want that, i want to keep a full backup and then only restore some of the DBs. I want to avoid having to prepare and then copy unneeded DBs. Something like --restore-only or a --ignore-db with regexp would be perfect. – higuita Oct 19 '15 at 02:18
  • 1
    I see. Check out --export option to restore individual tables. https://www.percona.com/doc/percona-xtrabackup/2.2/innobackupex/restoring_individual_tables_ibk.html – akuzminsky Oct 19 '15 at 02:22

0 Answers0