Why not rewrite xtrabackup using the new technology of Clone?

I have make some test on full backup using Xtrabackup and clone.
It seemed Clone is faster than Xtrabackup more than 0.5 times, Especially in high background stress test.
I do some research on both techniques。
Full backup:
Clone using “File Copy” + “Page Copy” + “Redo Copy”.
Xtrabackup using “File Copy” + “Redo Copy”.
Increment backup:
Clone: does not support
Xtrabackup using “Full File Scan or Page Copy” + “Redo Copy”.

Technique advantage and disadvantage

  1. There are some different on “Redo Copy” between the two techniques.
    To avoid the overwritten of redo log, Xtrabackup use redo log archiving function.
    but Clone do not use it, because Clone has “Page Copy” function, and it can shorten the time of Redo log tracking, so Clone can avoid the risk of overwritten of redo log.

  2. Clone call the page track interface of innodb directly in durable=false mode, it record modified page info in memory.
    Xtrabackup call the udf function of mysqlbackup component,it is finally call the page track interface of innodb in durable=true mode, it record modified page info in group page disk files. and in durable=true mode, make it easy to realize the function of increment backup.

  3. Clone support remote backup,because it has recipient and donor.
    Xtraback only support local backup, and need scp to remote, it is difficult to deploy.
    of course, Xtrabackup support stream function and can output to remote, but it need some extra user and right, it is not permitted in some environment.


  1. When we have “page copy”, it is not necessary to do “Redo log archiving”.
  2. We need remote backup function, something like the function of “remote Clone”.
  3. We need call the interface of mysqlbackup component to realize the increment backup.

My question is:
Why not rewrite the Xtrabackup full backup and increment backup function using Clone technology?
There are 2 way to realize it.
A. Modify the clone source to realize the function.
Let the clone has 3 function: Clone(exist), full backup, increment backup.
1. Clone exist function is not modified.
2. Add the full backup function, it is something like Clone, but written using the interface of mysqlbackup component udf.
3. Add increment backup function;
4. Let the output files consistent with Xtrabackup, so we can use the prepare function of Xtrabackup。

B. Modify the Xtrabackup source to realize the function.
1. Add “Page Copy” function
2. Let “Redo log tracking” instead of “Redo log archiving tracking”.
3. Add recipient (what it does is backup server) ,receive the command from mysql.
and add the communication of recipient and donor(server being backed up).

Which one is better?
I think the B is better, because I think Clone and backup are separate function. has there own application scenarios. make them together will be difficult to maintenance later. Do you think so?

And is there anything I missed or my understanding is wrong, please tell me?


Hi @miclewang thanks for posting to the Percona forums! I’ve escalated this to the PXB team, we’ll get back to you shortly on your idea!

1 Like