Xtrabackup stream to remote server

HI Team,

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

Now, I want to take full backup and incremental backup through the xtrabackup.

But I follow the direct approach of full backup, server storage is getting consumed at huge.

So,I am using below commands to perform full backup compressed.

xtrabackup --backup --stream=xbstream --compress --target-dir=./ > backup.xbstream

Now, xbstream file contains all the backup file and I can transfer this to different server and can take backup. This is fine.

Now, I need to take incremental backups after a full backup which needs to have access to base dir and the need to be reading data from main server where sql is running. How can I achieve this ?

2 Likes

Hello, have you considered mounting the remote volume via NFS?

1 Like

Hi @Ravi_Teja_RVN ,

You can either take a note of the LSN exported in the logs at the end of the backup:

2022-06-16T08:51:43.093458-03:00 0 [Note] [MY-011825] [Xtrabackup] The latest check point (for incremental): '2824937416'

And use that LSN on incremental at --incremental-lsn=2824937416

OR

Take your backup with --extra-lsndir=/backup/lsn this will create the two necessary files needed to take an incremental and use that dir as --incremental-basedir=/backup/lsn

1 Like