use rsync with stream
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Triaged
|
Wishlist
|
Unassigned | ||
2.1 |
New
|
Undecided
|
Unassigned | ||
2.2 |
Triaged
|
Wishlist
|
Unassigned | ||
2.3 |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Hello xtrabackup team
I am using your awesome tool to backup innodb Servers that host many databases.
Problem is the locking of tables while you are copying the .frm, .MYD and more files - which is a problem when using the --stream option.
I am using the --stream option, because it makes the most sense (backup directly to a separate machine in a separate building). Now you have implemented the --rsync option, which is a smart way to minimize locking time. On my Testserver i have 58 databases which end up to have 8526 files that need to be copied during the lock.
Lock on that test-machine is held for 1m20s using normal --stream method, apparently copying 8526 files takes that long. As a proof of concept I adopted your rsync trick for --stream and now locking takes 0m1s. Here is the command line used with my patch applied:
backupserver$ ssh USER@LIVESRV "/usr/bin/
I basically use the same idea, but instead of streaming the files right away I just run the second rsync (locally) into /tmp/mysql_backup/, then unlocking happens, then i use the /tmp/xtrabackup
Since I've found some TODO comments in your code where rsync will be used in the future, I understand that using my current trick with --rsync and --stream might make code too complicated. I am just presenting a working implementation of my idea. I guess for a final version of this a new option called --rsync-
I hope you will accept my patch and please let me know if I can help to nicely integrate this feature into your future releases.
best regards
Mike
forgot to mention, patch is against percona- xtrabackup- 2.2.3