1

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

0

2 Answers 2

3

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
2
  • Could you kindly provide it with gzip compression (preferably running at the target server)?
    – wmac
    Commented Mar 21, 2019 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
    Commented Mar 25, 2019 at 15:12
3

The solution was provided to me in the percona forum:

I did this and it worked:

ssh [email protected] "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 192.168.0.154 to 192.168.0.109 (this is my local machine for now).

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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