2

I am using Percona's xtrabackup to take backup of my online databases. Is there a way to convert the backup database files into a SQL dump similar to a backup created using mysqldump ?

Supratik
  • 2,104
  • 10
  • 49
  • 66

2 Answers2

2

Do you mean it's taking a file level copy of /var/lib/mysql (or the Windows equivalent)?

If that's the case, restore the files somewhere and change the MySQL data directory to where you have restored /var/lib/mysql to, e.g. in /etc/my.cnf (or the Windows equivalent):

datadir=/tmp/restore/var/lib/mysql

Then restart MySQL and you'll be using your recovered databases which you can use mysqldump against.

If you're using InnoDB tables you may need to read through this.

Xiol
  • 31
  • 1