Incremental backups are not working

Bug #1830204 reported by Tytus Kurek
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Percona Cluster Charm
Triaged
Low
Unassigned

Bug Description

It looks like incremental backups are not working when created through the "backup" action:

$ juju run-action percona-cluster/0 backup basedir=/var/backups/mysql incremental=True --wait
unit-percona-cluster-0:
  id: 7b947748-e402-48f8-8b91-87967172485c
  results:
    outcome: Success
    time-completed: "2019-05-23 12:23:08"
  status: completed
  timing:
    completed: 2019-05-23 12:23:08 +0000 UTC
    enqueued: 2019-05-23 12:23:04 +0000 UTC
    started: 2019-05-23 12:23:06 +0000 UTC
  unit: percona-cluster/0

The action succeeds, however, a full backup is taken instead:

$ juju ssh percona-cluster/0 sudo cat /var/backups/mysql/2019-05-23_12-23-06/xtrabackup_checkpoints
backup_type = full-backuped
from_lsn = 0
to_lsn = 2572120
last_lsn = 2572129
compact = 0
recover_binlog_info = 0
Connection to 172.16.0.170 closed.

This is due to a fact that the '--incremental-basedir' parameter is missing in the action file. According to the upstream documentation [1] incremental backups should be taken by running the following command:

$ innobackupex --incremental /data/backups --incremental-basedir=BASEDIR

At the moment only the '--incremental' parameter is passed:

cat percona-cluster/actions/backup
...
    if incremental:
        optionlist.append("--incremental")
...

[1] https://www.percona.com/doc/percona-xtrabackup/2.1/innobackupex/incremental_backups_innobackupex.html

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

Indeed, according to the documentation (https://www.percona.com/doc/percona-xtrabackup) the
--incremental=basedir=BASEDIR is needed and should point to the last full back-up that was done.

This would mean the action finding the most recent full backup from the currently passed basedir (in the action) and using that (in all probability). Alternatively, the user would need to specify the incremental basedir (which would mean inspecting the 'basedir' that had previously been used in the last full backup action) to be able to pass that value. And in order to do that, an action would be needed (probably) to list the full backup base dirs relative to a passed 'root basedir' that is used in the full backup.

Which means, this is a bit more complicated than a simple bug fix; I recommend a spec be written to propose how the feature of incremental backups be handled, and perhaps, in the meantime, remove the incremental option as it doesn't work.

Changed in charm-percona-cluster:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.