a) Run --wsrep-recover and get LSN (like how we get uuid:seqno)
b) Provide that LSN to mysqld (like how we provide
--wsrep-start-position but with a different parameter)
c) wsrep_sst_xtrabackup makes use of that LSN and if incremental
is enabled and SST is asked for, it will send that LSN in 'ready'
(It does this already except using the LSN of previous steps)
along with hostname (obtained from previous full SST, details
below)
d) Donor gets the LSN co-ordinates
i) In the first stage of SST, it sends the hostname if this
is a non-incremental backup.
ii) It checks the hostname obtained from joiner, if it
matches its own, then it does xtrabackup incremental backup.
iii) If not, it does a full backup but also sends 'full' in
the magic file sent in i).
e) Joiner knows if it is receiving full or incremental from
the file it received earlier.
f) In case of full, it is as before.
g) In case of incremental, it is streamed to a temporary
directory wherein it is prepared (while at the same time,
creating a fake xtrabackup_checkpoints file in $datadir).
h) Hostname is maintained in xtrabackup_ist file in $datadir.
All this will run automatically without user intervention, incremental=1 under [sst] will imply that do incremental if feasible.
Feasible here implies, if the hostnames of donors who provided
full and incremental don't match, it will be a full SST.
wsrep_sst_donor can be used to prefer donors in this case..
So, as discussed, this is how it will be done:
a) Run --wsrep-recover and get LSN (like how we get uuid:seqno)
b) Provide that LSN to mysqld (like how we provide start-position but with a different parameter)
--wsrep-
c) wsrep_sst_ xtrabackup makes use of that LSN and if incremental
is enabled and SST is asked for, it will send that LSN in 'ready'
(It does this already except using the LSN of previous steps)
along with hostname (obtained from previous full SST, details
below)
d) Donor gets the LSN co-ordinates
i) In the first stage of SST, it sends the hostname if this
is a non-incremental backup.
ii) It checks the hostname obtained from joiner, if it
matches its own, then it does xtrabackup incremental backup.
iii) If not, it does a full backup but also sends 'full' in
the magic file sent in i).
e) Joiner knows if it is receiving full or incremental from
the file it received earlier.
f) In case of full, it is as before.
g) In case of incremental, it is streamed to a temporary checkpoints file in $datadir).
directory wherein it is prepared (while at the same time,
creating a fake xtrabackup_
h) Hostname is maintained in xtrabackup_ist file in $datadir.
All this will run automatically without user intervention, incremental=1 under [sst] will imply that do incremental if feasible.
Feasible here implies, if the hostnames of donors who provided
full and incremental don't match, it will be a full SST.
wsrep_sst_donor can be used to prefer donors in this case..