Mysql backup of remote server in local machine using percona xtrabackup

percona

I have percona xtrabackup installed in my ubuntu client machine. My local machine IP address is 192.168.0.100. The database that i need to backup is in 192.168.0.200.
Is it possible to do the backup of remote server in local server using percona xtrabackup?
I tried doing the same using mysqldump in the past but i need to use percona xtrabackup in particular ?
Thank you for the response.

Best Answer

You need to install Percona Xtrabackup on the remote server and then SSH from your local server to the remote server. From this position, you can initiate the backup and stream to your local server.

Xtrabackup requires access to MySQL's data directory (and MySQL instance as well), so it can't be run on another server. However, it can be triggered by another server with SSH (or alternative solution) and you can stream the backup to the local server.

For example:

ssh serverA "innobackupex --stream=xbstream /var/lib/mysql" > backup.xbstream
Related Topic