how to take mysql xtrabackup to a remote server

1.8k views Asked by At

I have a server running with mysql with huge db of 1 TB.

Now, I want to take full backup through percona xtra backup, because incremental backup is easy with percona xtrabackup.

Now,if I initiate taking backup in that server,storage is getting consumed(I dont want this). So, I am trying to initate backup in mysql server but the backup need to be stored in a remote server so the existing server storage is not effected.

I have tried the below commands, but even though I have specied remote server ip , it is getting stored in the existing server and storage is getting consumed.

xtrabackup --backup [email protected] /home/qrnet/temp

innobackupex [email protected] /home/qrnet/temp

so, 10.16.124.208 is the remote server where I need to backup my sql files so that existing server storage does not impact.

But , it is getting stored in the existing server if I perform above commands where the sql is existing.

How to store the backups remotely without effecting existing storage and are there any alternative ways?

1

There are 1 answers

0
RP.S On

xtrabackup --help not have --remote-host
please try
innobackupex --defaults-file=/opt/mysql/etc/3306/my.cnf --user=user_A --password=password_A --socket=/opt/mysql/data/3306/mysqld.sock --no-timestamp --stream=tar /tmp/backup_xtrabackup | ssh [email protected] \ "cat - > /root/xtrabackup_date "+%Y%m%d".tar"

xtrabackup version 2.4.24 based on MySQL server 5.7.35 Linux (x86_64)