I had asked this question in serverfault.Later, i came to know about this site.

I have percona xtrabackup installed in my ubuntu client machine. My local machine IP address is The database that i need to backup is in 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.


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).

For example:

ssh serverA "innobackupex --stream=xbstream /var/lib/mysql" > backup.xbstream
  • Could you kindly provide it with gzip compression (preferably running at the target server)?
    – wmac
    Mar 21 '19 at 19:46
  • 1
    You can pipe to gzip if that would work for you? Here is an example manual page (this is for the latest version of software, but earlier versions will work this way too): percona.com/doc/percona-xtrabackup/8.0/howtos/…
    – greenweeds
    Mar 25 '19 at 15:12

The solution was provided to me in the percona forum:

I did this and it worked:

ssh diwakar@ "xtrabackup --user=root --password=root
  --backup --stream=xbstream --databases="uniquedb" --target-dir=./" >
  backup.xbstream 2>backup.log

This creates the backup of database named uniquedb from to (this is my local machine for now).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.