How can I do incremental backup to a remote server without full backup in local

Hi Gurus,

I would like to setup a backup center to store all the backup sets of 3 mysql databases. My policy is doing 1 full backup one week and incremental backup every other days in this week. All the backup sets will be compressed and encrypted. The backup sets will be sent to the backup center after finishing backup without leaving a copy at local.

I would like to choose xtrabackup to do this. But after doing the research, I found that the incremental backup is based on the full backup. Since the full backup already sent to the remote server, how can I resolve this issue? I appreciate if anyone can give a solution.

I would like to choose --stream=tar and using gzip to do compressing work.

Many thanks,

Tony

Hi Tony;

You may do this by using the --incremental-lsn option instead of --incremental-basedir option when performing the incremental backup. You will however still need to access the base backup somehow to find that LSN (or store it locally to start with).

If you look at your base backup, in the file xtrabackup-checkpoints, you will see something like:
backup_type = full-backuped from_lsn = 0 to_lsn = 1291135
The “to_lsn” value is what you want to set your --incremental-lsn value to. Then when you run your second incremental, you’ll have to get the same to_lsn value from the previous incremental, and so on.

[url]The innobackupex Option Reference

-Scott

1 Like

Hi Scott,

Appreciate your kindly reply. It’s really help.

I understand this if I can get the LSN number, I do not need the base backup to do the next one.

So I will try to leave this LSN info. to a local file after I finished each backup, reading this LSN info. before starting each incremental backup.

Many thanks,

Tony

Found a solution: using

Hi Tony;

Nice find! That sounds like a good solution to your problem.

-Scott